/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    ap-northeast-1 = 'retailcloud.aliyuncs.com',
    ap-northeast-2-pop = 'retailcloud.aliyuncs.com',
    ap-south-1 = 'retailcloud.aliyuncs.com',
    ap-southeast-1 = 'retailcloud.aliyuncs.com',
    ap-southeast-2 = 'retailcloud.aliyuncs.com',
    ap-southeast-3 = 'retailcloud.aliyuncs.com',
    ap-southeast-5 = 'retailcloud.aliyuncs.com',
    cn-beijing = 'retailcloud.aliyuncs.com',
    cn-beijing-finance-1 = 'retailcloud.aliyuncs.com',
    cn-beijing-finance-pop = 'retailcloud.aliyuncs.com',
    cn-beijing-gov-1 = 'retailcloud.aliyuncs.com',
    cn-beijing-nu16-b01 = 'retailcloud.aliyuncs.com',
    cn-chengdu = 'retailcloud.aliyuncs.com',
    cn-edge-1 = 'retailcloud.aliyuncs.com',
    cn-fujian = 'retailcloud.aliyuncs.com',
    cn-haidian-cm12-c01 = 'retailcloud.aliyuncs.com',
    cn-hangzhou = 'retailcloud.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'retailcloud.aliyuncs.com',
    cn-hangzhou-finance = 'retailcloud.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'retailcloud.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'retailcloud.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'retailcloud.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'retailcloud.aliyuncs.com',
    cn-hangzhou-test-306 = 'retailcloud.aliyuncs.com',
    cn-hongkong = 'retailcloud.aliyuncs.com',
    cn-hongkong-finance-pop = 'retailcloud.aliyuncs.com',
    cn-huhehaote = 'retailcloud.aliyuncs.com',
    cn-north-2-gov-1 = 'retailcloud.aliyuncs.com',
    cn-qingdao = 'retailcloud.aliyuncs.com',
    cn-qingdao-nebula = 'retailcloud.aliyuncs.com',
    cn-shanghai = 'retailcloud.aliyuncs.com',
    cn-shanghai-et15-b01 = 'retailcloud.aliyuncs.com',
    cn-shanghai-et2-b01 = 'retailcloud.aliyuncs.com',
    cn-shanghai-finance-1 = 'retailcloud.aliyuncs.com',
    cn-shanghai-inner = 'retailcloud.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'retailcloud.aliyuncs.com',
    cn-shenzhen = 'retailcloud.aliyuncs.com',
    cn-shenzhen-finance-1 = 'retailcloud.aliyuncs.com',
    cn-shenzhen-inner = 'retailcloud.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'retailcloud.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'retailcloud.aliyuncs.com',
    cn-wuhan = 'retailcloud.aliyuncs.com',
    cn-yushanfang = 'retailcloud.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'retailcloud.aliyuncs.com',
    cn-zhangjiakou = 'retailcloud.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'retailcloud.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'retailcloud.aliyuncs.com',
    eu-central-1 = 'retailcloud.aliyuncs.com',
    eu-west-1 = 'retailcloud.aliyuncs.com',
    eu-west-1-oxs = 'retailcloud.aliyuncs.com',
    me-east-1 = 'retailcloud.aliyuncs.com',
    rus-west-1-pop = 'retailcloud.aliyuncs.com',
    us-east-1 = 'retailcloud.aliyuncs.com',
    us-west-1 = 'retailcloud.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('retailcloud', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddClusterNodeRequest {
  clusterInstanceId?: string(name='ClusterInstanceId'),
  ecsInstanceIdList?: [ string ](name='EcsInstanceIdList'),
}

model AddClusterNodeResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    nonsense?: int32(name='Nonsense'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model AddClusterNodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddClusterNodeResponseBody(name='body'),
}

async function addClusterNodeWithOptions(request: AddClusterNodeRequest, runtime: Util.RuntimeOptions): AddClusterNodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterInstanceId)) {
    query['ClusterInstanceId'] = request.clusterInstanceId;
  }
  if (!Util.isUnset(request.ecsInstanceIdList)) {
    query['EcsInstanceIdList'] = request.ecsInstanceIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddClusterNode',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addClusterNode(request: AddClusterNodeRequest): AddClusterNodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return addClusterNodeWithOptions(request, runtime);
}

model AllocatePodConfigRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  requestId?: string(name='RequestId'),
}

model AllocatePodConfigResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    configData?: string(name='ConfigData'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model AllocatePodConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AllocatePodConfigResponseBody(name='body'),
}

async function allocatePodConfigWithOptions(request: AllocatePodConfigRequest, runtime: Util.RuntimeOptions): AllocatePodConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AllocatePodConfig',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function allocatePodConfig(request: AllocatePodConfigRequest): AllocatePodConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return allocatePodConfigWithOptions(request, runtime);
}

model BatchAddServersRequest {
  instanceId?: string(name='InstanceId'),
  regionId?: string(name='RegionId'),
  sign?: string(name='Sign'),
  vpcId?: string(name='VpcId'),
}

model BatchAddServersResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model BatchAddServersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BatchAddServersResponseBody(name='body'),
}

async function batchAddServersWithOptions(request: BatchAddServersRequest, runtime: Util.RuntimeOptions): BatchAddServersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.sign)) {
    query['Sign'] = request.sign;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchAddServers',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function batchAddServers(request: BatchAddServersRequest): BatchAddServersResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchAddServersWithOptions(request, runtime);
}

model BindGroupRequest {
  appId?: long(name='AppId'),
  bizCode?: string(name='BizCode'),
  name?: string(name='Name'),
}

model BindGroupResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model BindGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BindGroupResponseBody(name='body'),
}

async function bindGroupWithOptions(request: BindGroupRequest, runtime: Util.RuntimeOptions): BindGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.bizCode)) {
    query['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BindGroup',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function bindGroup(request: BindGroupRequest): BindGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindGroupWithOptions(request, runtime);
}

model BindNodeLabelRequest {
  clusterId?: string(name='ClusterId'),
  instanceId?: string(name='InstanceId'),
  labelKey?: string(name='LabelKey'),
  labelValue?: string(name='LabelValue'),
}

model BindNodeLabelResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model BindNodeLabelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BindNodeLabelResponseBody(name='body'),
}

async function bindNodeLabelWithOptions(request: BindNodeLabelRequest, runtime: Util.RuntimeOptions): BindNodeLabelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.labelKey)) {
    query['LabelKey'] = request.labelKey;
  }
  if (!Util.isUnset(request.labelValue)) {
    query['LabelValue'] = request.labelValue;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BindNodeLabel',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function bindNodeLabel(request: BindNodeLabelRequest): BindNodeLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindNodeLabelWithOptions(request, runtime);
}

model CloseDeployOrderRequest {
  deployOrderId?: long(name='DeployOrderId'),
}

model CloseDeployOrderResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CloseDeployOrderResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CloseDeployOrderResponseBody(name='body'),
}

async function closeDeployOrderWithOptions(request: CloseDeployOrderRequest, runtime: Util.RuntimeOptions): CloseDeployOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.deployOrderId)) {
    query['DeployOrderId'] = request.deployOrderId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CloseDeployOrder',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function closeDeployOrder(request: CloseDeployOrderRequest): CloseDeployOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return closeDeployOrderWithOptions(request, runtime);
}

model CreateAccountRequest {
  accountName?: string(name='AccountName'),
  accountPassword?: string(name='AccountPassword'),
  accountType?: string(name='AccountType'),
  dbInstanceId?: string(name='DbInstanceId'),
}

model CreateAccountResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
}

model CreateAccountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateAccountResponseBody(name='body'),
}

async function createAccountWithOptions(request: CreateAccountRequest, runtime: Util.RuntimeOptions): CreateAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountName)) {
    body['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.accountPassword)) {
    body['AccountPassword'] = request.accountPassword;
  }
  if (!Util.isUnset(request.accountType)) {
    body['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.dbInstanceId)) {
    body['DbInstanceId'] = request.dbInstanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAccount',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createAccount(request: CreateAccountRequest): CreateAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAccountWithOptions(request, runtime);
}

model CreateAppRequest {
  bizCode?: string(name='BizCode'),
  bizTitle?: string(name='BizTitle'),
  description?: string(name='Description'),
  groupName?: string(name='GroupName'),
  language?: string(name='Language'),
  middleWareIdList?: [ int32 ](name='MiddleWareIdList'),
  namespace?: string(name='Namespace'),
  operatingSystem?: string(name='OperatingSystem'),
  serviceType?: string(name='ServiceType'),
  stateType?: int32(name='StateType'),
  title?: string(name='Title'),
  userRoles?: [ 
    {
      roleName?: string(name='RoleName'),
      userId?: string(name='UserId'),
      userType?: string(name='UserType'),
    }
  ](name='UserRoles'),
}

model CreateAppResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appId?: long(name='AppId'),
  }(name='Result'),
}

model CreateAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateAppResponseBody(name='body'),
}

async function createAppWithOptions(request: CreateAppRequest, runtime: Util.RuntimeOptions): CreateAppResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizCode)) {
    body['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.bizTitle)) {
    body['BizTitle'] = request.bizTitle;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.groupName)) {
    body['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.language)) {
    body['Language'] = request.language;
  }
  if (!Util.isUnset(request.middleWareIdList)) {
    body['MiddleWareIdList'] = request.middleWareIdList;
  }
  if (!Util.isUnset(request.namespace)) {
    body['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.operatingSystem)) {
    body['OperatingSystem'] = request.operatingSystem;
  }
  if (!Util.isUnset(request.serviceType)) {
    body['ServiceType'] = request.serviceType;
  }
  if (!Util.isUnset(request.stateType)) {
    body['StateType'] = request.stateType;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  if (!Util.isUnset(request.userRoles)) {
    body['UserRoles'] = request.userRoles;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateApp',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createApp(request: CreateAppRequest): CreateAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppWithOptions(request, runtime);
}

model CreateAppGroupRequest {
  bizCode?: string(name='BizCode'),
  name?: string(name='Name'),
}

model CreateAppGroupResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appGroupId?: long(name='AppGroupId'),
  }(name='Result'),
}

model CreateAppGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateAppGroupResponseBody(name='body'),
}

async function createAppGroupWithOptions(request: CreateAppGroupRequest, runtime: Util.RuntimeOptions): CreateAppGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizCode)) {
    body['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAppGroup',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createAppGroup(request: CreateAppGroupRequest): CreateAppGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppGroupWithOptions(request, runtime);
}

model CreateAppMonitorsRequest {
  alarmTemplateId?: long(name='AlarmTemplateId'),
  appIds?: [ long ](name='AppIds'),
  envType?: int32(name='EnvType'),
  mainUserId?: long(name='MainUserId'),
  silenceTime?: string(name='SilenceTime'),
}

model CreateAppMonitorsResponseBody = {
  code?: int32(name='Code'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateAppMonitorsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateAppMonitorsResponseBody(name='body'),
}

async function createAppMonitorsWithOptions(request: CreateAppMonitorsRequest, runtime: Util.RuntimeOptions): CreateAppMonitorsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.alarmTemplateId)) {
    query['AlarmTemplateId'] = request.alarmTemplateId;
  }
  if (!Util.isUnset(request.envType)) {
    query['EnvType'] = request.envType;
  }
  if (!Util.isUnset(request.mainUserId)) {
    query['MainUserId'] = request.mainUserId;
  }
  if (!Util.isUnset(request.silenceTime)) {
    query['SilenceTime'] = request.silenceTime;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appIds)) {
    body['AppIds'] = request.appIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAppMonitors',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createAppMonitors(request: CreateAppMonitorsRequest): CreateAppMonitorsResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppMonitorsWithOptions(request, runtime);
}

model CreateAppResourceAllocRequest {
  appEnvId?: long(name='AppEnvId'),
  appId?: long(name='AppId'),
  clusterId?: string(name='ClusterId'),
}

model CreateAppResourceAllocResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appEnvId?: long(name='AppEnvId'),
    appId?: long(name='AppId'),
    clusterId?: string(name='ClusterId'),
    id?: long(name='Id'),
    resourceDef?: string(name='ResourceDef'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model CreateAppResourceAllocResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateAppResourceAllocResponseBody(name='body'),
}

async function createAppResourceAllocWithOptions(request: CreateAppResourceAllocRequest, runtime: Util.RuntimeOptions): CreateAppResourceAllocResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appEnvId)) {
    query['AppEnvId'] = request.appEnvId;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAppResourceAlloc',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createAppResourceAlloc(request: CreateAppResourceAllocRequest): CreateAppResourceAllocResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppResourceAllocWithOptions(request, runtime);
}

model CreateClusterRequest {
  businessCode?: string(name='BusinessCode'),
  cloudMonitorFlags?: int32(name='CloudMonitorFlags'),
  clusterEnvType?: string(name='ClusterEnvType'),
  clusterId?: long(name='ClusterId'),
  clusterTitle?: string(name='ClusterTitle'),
  clusterType?: string(name='ClusterType'),
  createWithArmsIntegration?: boolean(name='CreateWithArmsIntegration'),
  createWithLogIntegration?: boolean(name='CreateWithLogIntegration'),
  keyPair?: string(name='KeyPair'),
  netPlug?: string(name='NetPlug'),
  password?: string(name='Password'),
  podCIDR?: string(name='PodCIDR'),
  privateZone?: boolean(name='PrivateZone'),
  publicSlb?: int32(name='PublicSlb'),
  regionId?: string(name='RegionId'),
  regionName?: string(name='RegionName'),
  serviceCIDR?: string(name='ServiceCIDR'),
  snatEntry?: int32(name='SnatEntry'),
  vpcId?: string(name='VpcId'),
  vswitchids?: [ string ](name='Vswitchids'),
}

model CreateClusterResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    clusterInstanceId?: string(name='ClusterInstanceId'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model CreateClusterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateClusterResponseBody(name='body'),
}

async function createClusterWithOptions(request: CreateClusterRequest, runtime: Util.RuntimeOptions): CreateClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.businessCode)) {
    query['BusinessCode'] = request.businessCode;
  }
  if (!Util.isUnset(request.cloudMonitorFlags)) {
    query['CloudMonitorFlags'] = request.cloudMonitorFlags;
  }
  if (!Util.isUnset(request.clusterEnvType)) {
    query['ClusterEnvType'] = request.clusterEnvType;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterTitle)) {
    query['ClusterTitle'] = request.clusterTitle;
  }
  if (!Util.isUnset(request.clusterType)) {
    query['ClusterType'] = request.clusterType;
  }
  if (!Util.isUnset(request.createWithArmsIntegration)) {
    query['CreateWithArmsIntegration'] = request.createWithArmsIntegration;
  }
  if (!Util.isUnset(request.createWithLogIntegration)) {
    query['CreateWithLogIntegration'] = request.createWithLogIntegration;
  }
  if (!Util.isUnset(request.keyPair)) {
    query['KeyPair'] = request.keyPair;
  }
  if (!Util.isUnset(request.netPlug)) {
    query['NetPlug'] = request.netPlug;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  if (!Util.isUnset(request.podCIDR)) {
    query['PodCIDR'] = request.podCIDR;
  }
  if (!Util.isUnset(request.privateZone)) {
    query['PrivateZone'] = request.privateZone;
  }
  if (!Util.isUnset(request.publicSlb)) {
    query['PublicSlb'] = request.publicSlb;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.regionName)) {
    query['RegionName'] = request.regionName;
  }
  if (!Util.isUnset(request.serviceCIDR)) {
    query['ServiceCIDR'] = request.serviceCIDR;
  }
  if (!Util.isUnset(request.snatEntry)) {
    query['SnatEntry'] = request.snatEntry;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.vswitchids)) {
    query['Vswitchids'] = request.vswitchids;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateCluster',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createCluster(request: CreateClusterRequest): CreateClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClusterWithOptions(request, runtime);
}

model CreateDbRequest {
  characterSetName?: string(name='CharacterSetName', example='gbk'),
  dbDescription?: string(name='DbDescription'),
  dbInstanceId?: string(name='DbInstanceId', example='rm-uf6wjk5xxxxxxxxxx'),
  dbName?: string(name='DbName', example='rds_mysql'),
}

model CreateDbResponseBody = {
  code?: int32(name='Code', example='0'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId', example='07F6177E-6DE4-408A-BB4F-0723301340F3'),
}

model CreateDbResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateDbResponseBody(name='body'),
}

async function createDbWithOptions(request: CreateDbRequest, runtime: Util.RuntimeOptions): CreateDbResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.characterSetName)) {
    body['CharacterSetName'] = request.characterSetName;
  }
  if (!Util.isUnset(request.dbDescription)) {
    body['DbDescription'] = request.dbDescription;
  }
  if (!Util.isUnset(request.dbInstanceId)) {
    body['DbInstanceId'] = request.dbInstanceId;
  }
  if (!Util.isUnset(request.dbName)) {
    body['DbName'] = request.dbName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateDb',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDb(request: CreateDbRequest): CreateDbResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDbWithOptions(request, runtime);
}

model CreateDeployConfigRequest {
  appId?: long(name='AppId'),
  codePath?: string(name='CodePath'),
  configMap?: string(name='ConfigMap'),
  configMapList?: [ string ](name='ConfigMapList'),
  cronJob?: string(name='CronJob'),
  deployment?: string(name='Deployment'),
  envType?: string(name='EnvType'),
  name?: string(name='Name'),
  secretList?: [ string ](name='SecretList'),
  statefulSet?: string(name='StatefulSet'),
}

model CreateDeployConfigResponseBody = {
  code?: int32(name='Code'),
  errMessage?: string(name='ErrMessage'),
  requestId?: string(name='RequestId'),
  result?: {
    appId?: long(name='AppId'),
    name?: string(name='Name'),
    schemaId?: long(name='SchemaId'),
  }(name='Result'),
}

model CreateDeployConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateDeployConfigResponseBody(name='body'),
}

async function createDeployConfigWithOptions(request: CreateDeployConfigRequest, runtime: Util.RuntimeOptions): CreateDeployConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.codePath)) {
    query['CodePath'] = request.codePath;
  }
  if (!Util.isUnset(request.configMap)) {
    query['ConfigMap'] = request.configMap;
  }
  if (!Util.isUnset(request.configMapList)) {
    query['ConfigMapList'] = request.configMapList;
  }
  if (!Util.isUnset(request.cronJob)) {
    query['CronJob'] = request.cronJob;
  }
  if (!Util.isUnset(request.deployment)) {
    query['Deployment'] = request.deployment;
  }
  if (!Util.isUnset(request.envType)) {
    query['EnvType'] = request.envType;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.secretList)) {
    query['SecretList'] = request.secretList;
  }
  if (!Util.isUnset(request.statefulSet)) {
    query['StatefulSet'] = request.statefulSet;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateDeployConfig',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDeployConfig(request: CreateDeployConfigRequest): CreateDeployConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDeployConfigWithOptions(request, runtime);
}

model CreateEciConfigRequest {
  appEnvId?: long(name='AppEnvId'),
  eipBandwidth?: int32(name='EipBandwidth'),
  enableEciSchedulePolicy?: boolean(name='EnableEciSchedulePolicy'),
  mirrorCache?: boolean(name='MirrorCache'),
  normalInstanceLimit?: int32(name='NormalInstanceLimit'),
  scheduleVirtualNode?: boolean(name='ScheduleVirtualNode'),
}

model CreateEciConfigResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model CreateEciConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateEciConfigResponseBody(name='body'),
}

async function createEciConfigWithOptions(request: CreateEciConfigRequest, runtime: Util.RuntimeOptions): CreateEciConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appEnvId)) {
    query['AppEnvId'] = request.appEnvId;
  }
  if (!Util.isUnset(request.eipBandwidth)) {
    query['EipBandwidth'] = request.eipBandwidth;
  }
  if (!Util.isUnset(request.enableEciSchedulePolicy)) {
    query['EnableEciSchedulePolicy'] = request.enableEciSchedulePolicy;
  }
  if (!Util.isUnset(request.mirrorCache)) {
    query['MirrorCache'] = request.mirrorCache;
  }
  if (!Util.isUnset(request.normalInstanceLimit)) {
    query['NormalInstanceLimit'] = request.normalInstanceLimit;
  }
  if (!Util.isUnset(request.scheduleVirtualNode)) {
    query['ScheduleVirtualNode'] = request.scheduleVirtualNode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateEciConfig',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createEciConfig(request: CreateEciConfigRequest): CreateEciConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return createEciConfigWithOptions(request, runtime);
}

model CreateEnvironmentRequest {
  appId?: long(name='AppId'),
  appSchemaId?: long(name='AppSchemaId'),
  clusterId?: string(name='ClusterId'),
  envName?: string(name='EnvName'),
  envType?: int32(name='EnvType'),
  region?: string(name='Region'),
  replicas?: int32(name='Replicas'),
}

model CreateEnvironmentResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appEnvId?: long(name='AppEnvId'),
  }(name='Result'),
}

model CreateEnvironmentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateEnvironmentResponseBody(name='body'),
}

async function createEnvironmentWithOptions(request: CreateEnvironmentRequest, runtime: Util.RuntimeOptions): CreateEnvironmentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appSchemaId)) {
    query['AppSchemaId'] = request.appSchemaId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.envName)) {
    query['EnvName'] = request.envName;
  }
  if (!Util.isUnset(request.envType)) {
    query['EnvType'] = request.envType;
  }
  if (!Util.isUnset(request.region)) {
    query['Region'] = request.region;
  }
  if (!Util.isUnset(request.replicas)) {
    query['Replicas'] = request.replicas;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateEnvironment',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createEnvironment(request: CreateEnvironmentRequest): CreateEnvironmentResponse {
  var runtime = new Util.RuntimeOptions{};
  return createEnvironmentWithOptions(request, runtime);
}

model CreateNodeLabelRequest {
  clusterId?: string(name='ClusterId'),
  labelKey?: string(name='LabelKey'),
  labelValue?: string(name='LabelValue'),
}

model CreateNodeLabelResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    clusterId?: string(name='ClusterId'),
    id?: long(name='Id'),
    labelKey?: string(name='LabelKey'),
    labelValue?: string(name='LabelValue'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model CreateNodeLabelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateNodeLabelResponseBody(name='body'),
}

async function createNodeLabelWithOptions(request: CreateNodeLabelRequest, runtime: Util.RuntimeOptions): CreateNodeLabelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.labelKey)) {
    query['LabelKey'] = request.labelKey;
  }
  if (!Util.isUnset(request.labelValue)) {
    query['LabelValue'] = request.labelValue;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateNodeLabel',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createNodeLabel(request: CreateNodeLabelRequest): CreateNodeLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  return createNodeLabelWithOptions(request, runtime);
}

model CreatePersistentVolumeRequest {
  accessModes?: string(name='AccessModes'),
  capacity?: string(name='Capacity'),
  clusterInstanceId?: string(name='ClusterInstanceId'),
  mountDir?: string(name='MountDir'),
  mountTargetDomain?: string(name='MountTargetDomain'),
  NFSVersion?: string(name='NFSVersion'),
  name?: string(name='Name'),
  nasType?: string(name='NasType', example='NFS'),
  reclaimPolicy?: string(name='ReclaimPolicy'),
  storageClass?: string(name='StorageClass'),
}

model CreatePersistentVolumeResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    persistentVolumeId?: long(name='PersistentVolumeId'),
  }(name='Result'),
}

model CreatePersistentVolumeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreatePersistentVolumeResponseBody(name='body'),
}

async function createPersistentVolumeWithOptions(request: CreatePersistentVolumeRequest, runtime: Util.RuntimeOptions): CreatePersistentVolumeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accessModes)) {
    body['AccessModes'] = request.accessModes;
  }
  if (!Util.isUnset(request.capacity)) {
    body['Capacity'] = request.capacity;
  }
  if (!Util.isUnset(request.clusterInstanceId)) {
    body['ClusterInstanceId'] = request.clusterInstanceId;
  }
  if (!Util.isUnset(request.mountDir)) {
    body['MountDir'] = request.mountDir;
  }
  if (!Util.isUnset(request.mountTargetDomain)) {
    body['MountTargetDomain'] = request.mountTargetDomain;
  }
  if (!Util.isUnset(request.NFSVersion)) {
    body['NFSVersion'] = request.NFSVersion;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.nasType)) {
    body['NasType'] = request.nasType;
  }
  if (!Util.isUnset(request.reclaimPolicy)) {
    body['ReclaimPolicy'] = request.reclaimPolicy;
  }
  if (!Util.isUnset(request.storageClass)) {
    body['StorageClass'] = request.storageClass;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreatePersistentVolume',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createPersistentVolume(request: CreatePersistentVolumeRequest): CreatePersistentVolumeResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPersistentVolumeWithOptions(request, runtime);
}

model CreatePersistentVolumeClaimRequest {
  accessModes?: string(name='AccessModes'),
  appId?: long(name='AppId'),
  capacity?: string(name='Capacity'),
  envId?: long(name='EnvId'),
  name?: string(name='Name'),
  storageClass?: string(name='StorageClass'),
}

model CreatePersistentVolumeClaimResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    persistentVolumeClaimId?: long(name='PersistentVolumeClaimId'),
  }(name='Result'),
}

model CreatePersistentVolumeClaimResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreatePersistentVolumeClaimResponseBody(name='body'),
}

async function createPersistentVolumeClaimWithOptions(request: CreatePersistentVolumeClaimRequest, runtime: Util.RuntimeOptions): CreatePersistentVolumeClaimResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accessModes)) {
    query['AccessModes'] = request.accessModes;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.capacity)) {
    query['Capacity'] = request.capacity;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.storageClass)) {
    query['StorageClass'] = request.storageClass;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreatePersistentVolumeClaim',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createPersistentVolumeClaim(request: CreatePersistentVolumeClaimRequest): CreatePersistentVolumeClaimResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPersistentVolumeClaimWithOptions(request, runtime);
}

model CreateServiceRequest {
  envId?: long(name='EnvId'),
  headless?: boolean(name='Headless'),
  k8sServiceId?: string(name='K8sServiceId'),
  name?: string(name='Name'),
  portMappings?: [ 
    {
      name?: string(name='Name'),
      nodePort?: int32(name='NodePort'),
      port?: int32(name='Port'),
      protocol?: string(name='Protocol'),
      targetPort?: string(name='TargetPort'),
    }
  ](name='PortMappings'),
  serviceType?: string(name='ServiceType'),
}

model CreateServiceResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    serviceId?: long(name='ServiceId'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model CreateServiceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateServiceResponseBody(name='body'),
}

async function createServiceWithOptions(request: CreateServiceRequest, runtime: Util.RuntimeOptions): CreateServiceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.headless)) {
    query['Headless'] = request.headless;
  }
  if (!Util.isUnset(request.k8sServiceId)) {
    query['K8sServiceId'] = request.k8sServiceId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.serviceType)) {
    query['ServiceType'] = request.serviceType;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.portMappings)) {
    body['PortMappings'] = request.portMappings;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateService',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createService(request: CreateServiceRequest): CreateServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createServiceWithOptions(request, runtime);
}

model CreateSlbAPRequest {
  cookieTimeout?: int32(name='CookieTimeout'),
  envId?: long(name='EnvId'),
  establishedTimeout?: int32(name='EstablishedTimeout'),
  listenerPort?: int32(name='ListenerPort'),
  name?: string(name='Name'),
  protocol?: string(name='Protocol'),
  realServerPort?: int32(name='RealServerPort'),
  slbId?: string(name='SlbId'),
  sslCertId?: string(name='SslCertId'),
  stickySession?: int32(name='StickySession'),
}

model CreateSlbAPResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    slbAPId?: long(name='SlbAPId'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model CreateSlbAPResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateSlbAPResponseBody(name='body'),
}

async function createSlbAPWithOptions(request: CreateSlbAPRequest, runtime: Util.RuntimeOptions): CreateSlbAPResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cookieTimeout)) {
    query['CookieTimeout'] = request.cookieTimeout;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.establishedTimeout)) {
    query['EstablishedTimeout'] = request.establishedTimeout;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.protocol)) {
    query['Protocol'] = request.protocol;
  }
  if (!Util.isUnset(request.realServerPort)) {
    query['RealServerPort'] = request.realServerPort;
  }
  if (!Util.isUnset(request.slbId)) {
    query['SlbId'] = request.slbId;
  }
  if (!Util.isUnset(request.sslCertId)) {
    query['SslCertId'] = request.sslCertId;
  }
  if (!Util.isUnset(request.stickySession)) {
    query['StickySession'] = request.stickySession;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateSlbAP',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createSlbAP(request: CreateSlbAPRequest): CreateSlbAPResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSlbAPWithOptions(request, runtime);
}

model DeleteAppDetailRequest {
  appId?: long(name='AppId'),
  force?: boolean(name='Force'),
}

model DeleteAppDetailResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model DeleteAppDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteAppDetailResponseBody(name='body'),
}

async function deleteAppDetailWithOptions(request: DeleteAppDetailRequest, runtime: Util.RuntimeOptions): DeleteAppDetailResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAppDetail',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteAppDetail(request: DeleteAppDetailRequest): DeleteAppDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppDetailWithOptions(request, runtime);
}

model DeleteAppEnvironmentRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  force?: boolean(name='Force'),
}

model DeleteAppEnvironmentResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model DeleteAppEnvironmentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteAppEnvironmentResponseBody(name='body'),
}

async function deleteAppEnvironmentWithOptions(request: DeleteAppEnvironmentRequest, runtime: Util.RuntimeOptions): DeleteAppEnvironmentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.force)) {
    query['Force'] = request.force;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAppEnvironment',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteAppEnvironment(request: DeleteAppEnvironmentRequest): DeleteAppEnvironmentResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppEnvironmentWithOptions(request, runtime);
}

model DeleteAppGroupRequest {
  force?: boolean(name='Force'),
  groupId?: long(name='GroupId'),
}

model DeleteAppGroupResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model DeleteAppGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteAppGroupResponseBody(name='body'),
}

async function deleteAppGroupWithOptions(request: DeleteAppGroupRequest, runtime: Util.RuntimeOptions): DeleteAppGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.force)) {
    query['Force'] = request.force;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAppGroup',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteAppGroup(request: DeleteAppGroupRequest): DeleteAppGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppGroupWithOptions(request, runtime);
}

model DeleteAppResourceAllocRequest {
  appEnvId?: long(name='AppEnvId'),
}

model DeleteAppResourceAllocResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeleteAppResourceAllocResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteAppResourceAllocResponseBody(name='body'),
}

async function deleteAppResourceAllocWithOptions(request: DeleteAppResourceAllocRequest, runtime: Util.RuntimeOptions): DeleteAppResourceAllocResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appEnvId)) {
    query['AppEnvId'] = request.appEnvId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAppResourceAlloc',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteAppResourceAlloc(request: DeleteAppResourceAllocRequest): DeleteAppResourceAllocResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAppResourceAllocWithOptions(request, runtime);
}

model DeleteClusterRequest {
  clusterInstanceId?: string(name='ClusterInstanceId'),
}

model DeleteClusterResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    nonsense?: int32(name='Nonsense'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DeleteClusterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteClusterResponseBody(name='body'),
}

async function deleteClusterWithOptions(request: DeleteClusterRequest, runtime: Util.RuntimeOptions): DeleteClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterInstanceId)) {
    query['ClusterInstanceId'] = request.clusterInstanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCluster',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCluster(request: DeleteClusterRequest): DeleteClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteClusterWithOptions(request, runtime);
}

model DeleteDatabaseRequest {
  DBInstanceId?: string(name='DBInstanceId', example='rm-uf6wjk5xxxxxxx'),
  DBName?: string(name='DBName', example='testdb01'),
}

model DeleteDatabaseResponseBody = {
  code?: int32(name='Code', example='0'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId', example='07F6177E-6DE4-408A-BB4F-0723301340F3'),
}

model DeleteDatabaseResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDatabaseResponseBody(name='body'),
}

async function deleteDatabaseWithOptions(request: DeleteDatabaseRequest, runtime: Util.RuntimeOptions): DeleteDatabaseResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.DBInstanceId)) {
    body['DBInstanceId'] = request.DBInstanceId;
  }
  if (!Util.isUnset(request.DBName)) {
    body['DBName'] = request.DBName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDatabase',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDatabase(request: DeleteDatabaseRequest): DeleteDatabaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDatabaseWithOptions(request, runtime);
}

model DeleteDeployConfigRequest {
  schemaId?: long(name='SchemaId'),
}

model DeleteDeployConfigResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model DeleteDeployConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDeployConfigResponseBody(name='body'),
}

async function deleteDeployConfigWithOptions(request: DeleteDeployConfigRequest, runtime: Util.RuntimeOptions): DeleteDeployConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.schemaId)) {
    query['SchemaId'] = request.schemaId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDeployConfig',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDeployConfig(request: DeleteDeployConfigRequest): DeleteDeployConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDeployConfigWithOptions(request, runtime);
}

model DeleteNodeLabelRequest {
  clusterId?: string(name='ClusterId'),
  force?: boolean(name='Force'),
  labelKey?: string(name='LabelKey'),
  labelValue?: string(name='LabelValue'),
}

model DeleteNodeLabelResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeleteNodeLabelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteNodeLabelResponseBody(name='body'),
}

async function deleteNodeLabelWithOptions(request: DeleteNodeLabelRequest, runtime: Util.RuntimeOptions): DeleteNodeLabelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.force)) {
    query['Force'] = request.force;
  }
  if (!Util.isUnset(request.labelKey)) {
    query['LabelKey'] = request.labelKey;
  }
  if (!Util.isUnset(request.labelValue)) {
    query['LabelValue'] = request.labelValue;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteNodeLabel',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteNodeLabel(request: DeleteNodeLabelRequest): DeleteNodeLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteNodeLabelWithOptions(request, runtime);
}

model DeletePersistentVolumeRequest {
  clusterInstanceId?: string(name='ClusterInstanceId'),
  persistentVolumeName?: string(name='PersistentVolumeName'),
}

model DeletePersistentVolumeResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model DeletePersistentVolumeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeletePersistentVolumeResponseBody(name='body'),
}

async function deletePersistentVolumeWithOptions(request: DeletePersistentVolumeRequest, runtime: Util.RuntimeOptions): DeletePersistentVolumeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clusterInstanceId)) {
    body['ClusterInstanceId'] = request.clusterInstanceId;
  }
  if (!Util.isUnset(request.persistentVolumeName)) {
    body['PersistentVolumeName'] = request.persistentVolumeName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeletePersistentVolume',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deletePersistentVolume(request: DeletePersistentVolumeRequest): DeletePersistentVolumeResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePersistentVolumeWithOptions(request, runtime);
}

model DeletePersistentVolumeClaimRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  persistentVolumeClaimName?: string(name='PersistentVolumeClaimName'),
}

model DeletePersistentVolumeClaimResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model DeletePersistentVolumeClaimResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeletePersistentVolumeClaimResponseBody(name='body'),
}

async function deletePersistentVolumeClaimWithOptions(request: DeletePersistentVolumeClaimRequest, runtime: Util.RuntimeOptions): DeletePersistentVolumeClaimResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.persistentVolumeClaimName)) {
    query['PersistentVolumeClaimName'] = request.persistentVolumeClaimName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeletePersistentVolumeClaim',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deletePersistentVolumeClaim(request: DeletePersistentVolumeClaimRequest): DeletePersistentVolumeClaimResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePersistentVolumeClaimWithOptions(request, runtime);
}

model DeleteRdsAccountRequest {
  accountName?: string(name='AccountName', example='test1'),
  dbInstanceId?: string(name='DbInstanceId', example='rm-uf6wjk5xxxxxxx'),
}

model DeleteRdsAccountResponseBody = {
  code?: int32(name='Code', example='0'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId', example='91E855E5-7E80-4955-929B-C74EE1D38C66'),
  result?: {
    requestId?: string(name='RequestId', example='91E855E5-7E80-4955-929B-C74EE1D38C66'),
  }(name='Result'),
}

model DeleteRdsAccountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteRdsAccountResponseBody(name='body'),
}

async function deleteRdsAccountWithOptions(request: DeleteRdsAccountRequest, runtime: Util.RuntimeOptions): DeleteRdsAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountName)) {
    body['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.dbInstanceId)) {
    body['DbInstanceId'] = request.dbInstanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteRdsAccount',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteRdsAccount(request: DeleteRdsAccountRequest): DeleteRdsAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteRdsAccountWithOptions(request, runtime);
}

model DeleteServiceRequest {
  serviceId?: long(name='ServiceId'),
}

model DeleteServiceResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeleteServiceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteServiceResponseBody(name='body'),
}

async function deleteServiceWithOptions(request: DeleteServiceRequest, runtime: Util.RuntimeOptions): DeleteServiceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.serviceId)) {
    query['ServiceId'] = request.serviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteService',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteService(request: DeleteServiceRequest): DeleteServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteServiceWithOptions(request, runtime);
}

model DeleteSlbAPRequest {
  slbAPId?: long(name='SlbAPId'),
}

model DeleteSlbAPResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeleteSlbAPResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteSlbAPResponseBody(name='body'),
}

async function deleteSlbAPWithOptions(request: DeleteSlbAPRequest, runtime: Util.RuntimeOptions): DeleteSlbAPResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.slbAPId)) {
    query['SlbAPId'] = request.slbAPId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSlbAP',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteSlbAP(request: DeleteSlbAPRequest): DeleteSlbAPResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSlbAPWithOptions(request, runtime);
}

model DeployAppRequest {
  armsFlag?: boolean(name='ArmsFlag'),
  containerImageList?: [ string ](name='ContainerImageList'),
  defaultPacketOfAppGroup?: string(name='DefaultPacketOfAppGroup'),
  deployPacketId?: long(name='DeployPacketId'),
  deployPacketUrl?: string(name='DeployPacketUrl'),
  description?: string(name='Description'),
  envId?: long(name='EnvId'),
  initContainerImageList?: [ string ](name='InitContainerImageList'),
  name?: string(name='Name'),
  pauseType?: string(name='PauseType'),
  totalPartitions?: int32(name='TotalPartitions'),
  updateStrategyType?: string(name='UpdateStrategyType'),
}

model DeployAppResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    admitted?: boolean(name='Admitted'),
    businessCode?: string(name='BusinessCode'),
    deployOrderId?: long(name='DeployOrderId'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DeployAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeployAppResponseBody(name='body'),
}

async function deployAppWithOptions(request: DeployAppRequest, runtime: Util.RuntimeOptions): DeployAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.armsFlag)) {
    query['ArmsFlag'] = request.armsFlag;
  }
  if (!Util.isUnset(request.containerImageList)) {
    query['ContainerImageList'] = request.containerImageList;
  }
  if (!Util.isUnset(request.defaultPacketOfAppGroup)) {
    query['DefaultPacketOfAppGroup'] = request.defaultPacketOfAppGroup;
  }
  if (!Util.isUnset(request.deployPacketId)) {
    query['DeployPacketId'] = request.deployPacketId;
  }
  if (!Util.isUnset(request.deployPacketUrl)) {
    query['DeployPacketUrl'] = request.deployPacketUrl;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.initContainerImageList)) {
    query['InitContainerImageList'] = request.initContainerImageList;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.pauseType)) {
    query['PauseType'] = request.pauseType;
  }
  if (!Util.isUnset(request.totalPartitions)) {
    query['TotalPartitions'] = request.totalPartitions;
  }
  if (!Util.isUnset(request.updateStrategyType)) {
    query['UpdateStrategyType'] = request.updateStrategyType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeployApp',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deployApp(request: DeployAppRequest): DeployAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return deployAppWithOptions(request, runtime);
}

model DescribeAppDetailRequest {
  appId?: long(name='AppId'),
}

model DescribeAppDetailResponseBody = {
  code?: long(name='Code'),
  errMessage?: string(name='ErrMessage'),
  requestId?: string(name='RequestId'),
  result?: {
    appId?: long(name='AppId'),
    appStateType?: string(name='AppStateType'),
    bizName?: string(name='BizName'),
    bizTitle?: string(name='BizTitle'),
    deployType?: string(name='DeployType'),
    description?: string(name='Description'),
    language?: string(name='Language'),
    middleWareInfoList?: [ 
      {
        appId?: long(name='AppId'),
        code?: int32(name='Code'),
        name?: string(name='Name'),
      }
    ](name='MiddleWareInfoList'),
    operatingSystem?: string(name='OperatingSystem'),
    serviceType?: string(name='ServiceType'),
    title?: string(name='Title'),
    userRoles?: [ 
      {
        realName?: string(name='RealName'),
        roleName?: string(name='RoleName'),
        userId?: string(name='UserId'),
        userType?: string(name='UserType'),
      }
    ](name='UserRoles'),
  }(name='Result'),
}

model DescribeAppDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAppDetailResponseBody(name='body'),
}

async function describeAppDetailWithOptions(request: DescribeAppDetailRequest, runtime: Util.RuntimeOptions): DescribeAppDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppDetail',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAppDetail(request: DescribeAppDetailRequest): DescribeAppDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppDetailWithOptions(request, runtime);
}

model DescribeAppEnvDeployBaselineRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
}

model DescribeAppEnvDeployBaselineResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appId?: long(name='AppId'),
    createTime?: string(name='CreateTime'),
    envId?: long(name='EnvId'),
    packetComment?: string(name='PacketComment'),
    packetId?: long(name='PacketId'),
    packetUrl?: string(name='PacketUrl'),
    schemaId?: long(name='SchemaId'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribeAppEnvDeployBaselineResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAppEnvDeployBaselineResponseBody(name='body'),
}

async function describeAppEnvDeployBaselineWithOptions(request: DescribeAppEnvDeployBaselineRequest, runtime: Util.RuntimeOptions): DescribeAppEnvDeployBaselineResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppEnvDeployBaseline',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAppEnvDeployBaseline(request: DescribeAppEnvDeployBaselineRequest): DescribeAppEnvDeployBaselineResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppEnvDeployBaselineWithOptions(request, runtime);
}

model DescribeAppEnvironmentDetailRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
}

model DescribeAppEnvironmentDetailResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appId?: long(name='AppId'),
    appSchemaId?: long(name='AppSchemaId'),
    envId?: long(name='EnvId'),
    envName?: string(name='EnvName'),
    envType?: int32(name='EnvType'),
    envTypeName?: string(name='EnvTypeName'),
    region?: string(name='Region'),
    replicas?: int32(name='Replicas'),
  }(name='Result'),
}

model DescribeAppEnvironmentDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAppEnvironmentDetailResponseBody(name='body'),
}

async function describeAppEnvironmentDetailWithOptions(request: DescribeAppEnvironmentDetailRequest, runtime: Util.RuntimeOptions): DescribeAppEnvironmentDetailResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppEnvironmentDetail',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAppEnvironmentDetail(request: DescribeAppEnvironmentDetailRequest): DescribeAppEnvironmentDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppEnvironmentDetailWithOptions(request, runtime);
}

model DescribeAppGroupDeploySettingRequest {
  appGroupId?: long(name='AppGroupId'),
  envType?: string(name='EnvType'),
}

model DescribeAppGroupDeploySettingResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    defaultPacketComment?: string(name='DefaultPacketComment'),
    defaultPacketId?: long(name='DefaultPacketId'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribeAppGroupDeploySettingResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAppGroupDeploySettingResponseBody(name='body'),
}

async function describeAppGroupDeploySettingWithOptions(request: DescribeAppGroupDeploySettingRequest, runtime: Util.RuntimeOptions): DescribeAppGroupDeploySettingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appGroupId)) {
    query['AppGroupId'] = request.appGroupId;
  }
  if (!Util.isUnset(request.envType)) {
    query['EnvType'] = request.envType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppGroupDeploySetting',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAppGroupDeploySetting(request: DescribeAppGroupDeploySettingRequest): DescribeAppGroupDeploySettingResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppGroupDeploySettingWithOptions(request, runtime);
}

model DescribeAppMonitorMetricRequest {
  appId?: long(name='AppId'),
  deployOrderId?: string(name='DeployOrderId'),
  endTime?: long(name='EndTime'),
  envId?: long(name='EnvId'),
  metric?: string(name='Metric'),
  podName?: string(name='PodName'),
  startTime?: long(name='StartTime'),
  type?: string(name='Type'),
}

model DescribeAppMonitorMetricResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: [ 
    {
      categories?: [ string ](name='Categories'),
      data?: [ float ](name='Data'),
      name?: string(name='Name'),
    }
  ](name='Result'),
  success?: boolean(name='Success'),
}

model DescribeAppMonitorMetricResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAppMonitorMetricResponseBody(name='body'),
}

async function describeAppMonitorMetricWithOptions(request: DescribeAppMonitorMetricRequest, runtime: Util.RuntimeOptions): DescribeAppMonitorMetricResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.deployOrderId)) {
    query['DeployOrderId'] = request.deployOrderId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.metric)) {
    query['Metric'] = request.metric;
  }
  if (!Util.isUnset(request.podName)) {
    query['PodName'] = request.podName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppMonitorMetric',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAppMonitorMetric(request: DescribeAppMonitorMetricRequest): DescribeAppMonitorMetricResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppMonitorMetricWithOptions(request, runtime);
}

model DescribeAppResourceAllocRequest {
  appEnvId?: long(name='AppEnvId'),
}

model DescribeAppResourceAllocResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appEnvId?: long(name='AppEnvId'),
    appId?: long(name='AppId'),
    clusterId?: string(name='ClusterId'),
    id?: long(name='Id'),
    resourceDef?: string(name='ResourceDef'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribeAppResourceAllocResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAppResourceAllocResponseBody(name='body'),
}

async function describeAppResourceAllocWithOptions(request: DescribeAppResourceAllocRequest, runtime: Util.RuntimeOptions): DescribeAppResourceAllocResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppResourceAlloc',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAppResourceAlloc(request: DescribeAppResourceAllocRequest): DescribeAppResourceAllocResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppResourceAllocWithOptions(request, runtime);
}

model DescribeClusterDetailRequest {
  clusterInstanceId?: string(name='ClusterInstanceId'),
}

model DescribeClusterDetailResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    basicInfo?: {
      businessCode?: string(name='BusinessCode'),
      clusterId?: long(name='ClusterId'),
      clusterInstanceId?: string(name='ClusterInstanceId'),
      clusterName?: string(name='ClusterName'),
      ecsIds?: [ string ](name='EcsIds'),
      envType?: string(name='EnvType'),
      hasInstallArmsPilot?: boolean(name='HasInstallArmsPilot'),
      hasInstallLogController?: boolean(name='HasInstallLogController'),
      installArmsInProcess?: boolean(name='InstallArmsInProcess'),
      installLogInProcess?: boolean(name='InstallLogInProcess'),
      mainUserId?: string(name='MainUserId'),
      regionId?: string(name='RegionId'),
      regionName?: string(name='RegionName'),
      userNick?: string(name='UserNick'),
      vpcId?: string(name='VpcId'),
      vswitchs?: [ string ](name='Vswitchs'),
    }(name='BasicInfo'),
    instanceInfo?: {
      allocatePodCount?: int32(name='AllocatePodCount'),
      allocatedPodInfoList?: [ 
        {
          appId?: long(name='AppId'),
          appName?: string(name='AppName'),
          cupRequest?: string(name='CupRequest'),
          envId?: long(name='EnvId'),
          envName?: string(name='EnvName'),
          memRequest?: string(name='MemRequest'),
          podCount?: int32(name='PodCount'),
        }
      ](name='AllocatedPodInfoList'),
      appCount?: int32(name='AppCount'),
      availablePodInfoList?: [ 
        {
          availablePodCount?: int32(name='AvailablePodCount'),
          cupRequest?: string(name='CupRequest'),
          memRequest?: string(name='MemRequest'),
        }
      ](name='AvailablePodInfoList'),
    }(name='InstanceInfo'),
    netInfo?: {
      netPlugType?: string(name='NetPlugType'),
      prodCIDR?: string(name='ProdCIDR'),
      serviceCIDR?: string(name='ServiceCIDR'),
    }(name='NetInfo'),
    nodeWorkLoadList?: [ 
      {
        appPodCount?: int32(name='AppPodCount'),
        cpuRequest?: string(name='CpuRequest'),
        cpuTotal?: string(name='CpuTotal'),
        cpuUse?: string(name='CpuUse'),
        instanceId?: string(name='InstanceId'),
        memRequest?: string(name='MemRequest'),
        memTotal?: string(name='MemTotal'),
        memUse?: string(name='MemUse'),
        nodeName?: string(name='NodeName'),
        podCount?: int32(name='PodCount'),
        ready?: boolean(name='Ready'),
        unschedulable?: boolean(name='Unschedulable'),
      }
    ](name='NodeWorkLoadList'),
    workLoad?: {
      allNodeCount?: int32(name='AllNodeCount'),
      allocateAllPodCount?: int32(name='AllocateAllPodCount'),
      allocateAppPodCount?: int32(name='AllocateAppPodCount'),
      cpuCapacityTotal?: string(name='CpuCapacityTotal'),
      cpuLevel?: string(name='CpuLevel'),
      cpuRequest?: string(name='CpuRequest'),
      cpuRequestPercent?: string(name='CpuRequestPercent'),
      cpuTotal?: string(name='CpuTotal'),
      cpuUse?: string(name='CpuUse'),
      cpuUsePercent?: string(name='CpuUsePercent'),
      memCapacityTotal?: string(name='MemCapacityTotal'),
      memLevel?: string(name='MemLevel'),
      memRequest?: string(name='MemRequest'),
      memRequestPercent?: string(name='MemRequestPercent'),
      memTotal?: string(name='MemTotal'),
      memUse?: string(name='MemUse'),
      memUsePercent?: string(name='MemUsePercent'),
    }(name='WorkLoad'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribeClusterDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeClusterDetailResponseBody(name='body'),
}

async function describeClusterDetailWithOptions(request: DescribeClusterDetailRequest, runtime: Util.RuntimeOptions): DescribeClusterDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterInstanceId)) {
    query['ClusterInstanceId'] = request.clusterInstanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterDetail',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterDetail(request: DescribeClusterDetailRequest): DescribeClusterDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterDetailWithOptions(request, runtime);
}

model DescribeDatabasesRequest {
  instanceId?: string(name='InstanceId', example='rm-ul9wjk5xxxxxxx'),
}

model DescribeDatabasesResponseBody = {
  code?: int32(name='Code', example='0'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId', example='79a8ab31-32ce-4d27-a006-339a5eae3b6e'),
  result?: {
    databases?: [ 
      {
        accounts?: [ 
          {
            account?: string(name='Account', example='test'),
            accountPrivilege?: string(name='AccountPrivilege', example='DMLOnly'),
            accountPrivilegeDetail?: string(name='AccountPrivilegeDetail', example='SELECT'),
          }
        ](name='Accounts'),
        characterSetName?: string(name='CharacterSetName', example='utf8'),
        DBDescription?: string(name='DBDescription'),
        DBInstanceId?: string(name='DBInstanceId', example='rm-ul9wjk5xxxxxxx'),
        DBName?: string(name='DBName', example='testDBmm'),
        DBStatus?: string(name='DBStatus', example='Creating'),
        engine?: string(name='Engine', example='MySQL'),
      }
    ](name='Databases'),
  }(name='Result'),
}

model DescribeDatabasesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeDatabasesResponseBody(name='body'),
}

async function describeDatabasesWithOptions(request: DescribeDatabasesRequest, runtime: Util.RuntimeOptions): DescribeDatabasesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDatabases',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDatabases(request: DescribeDatabasesRequest): DescribeDatabasesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDatabasesWithOptions(request, runtime);
}

model DescribeDeployOrderDetailRequest {
  deployOrderId?: long(name='DeployOrderId'),
}

model DescribeDeployOrderDetailResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appInstanceType?: string(name='AppInstanceType'),
    currentPartitionNum?: int32(name='CurrentPartitionNum'),
    deployOrderId?: long(name='DeployOrderId'),
    deployPauseType?: string(name='DeployPauseType'),
    deployPauseTypeName?: string(name='DeployPauseTypeName'),
    deployType?: string(name='DeployType'),
    deployTypeName?: string(name='DeployTypeName'),
    description?: string(name='Description'),
    elapsedTime?: int32(name='ElapsedTime'),
    endTime?: string(name='EndTime'),
    envId?: long(name='EnvId'),
    envType?: string(name='EnvType'),
    failureRate?: string(name='FailureRate'),
    finishAppInstanceCt?: int32(name='FinishAppInstanceCt'),
    name?: string(name='Name'),
    partitionType?: string(name='PartitionType'),
    partitionTypeName?: string(name='PartitionTypeName'),
    result?: int32(name='Result'),
    resultName?: string(name='ResultName'),
    schemaId?: long(name='SchemaId'),
    startTime?: string(name='StartTime'),
    status?: int32(name='Status'),
    statusName?: string(name='StatusName'),
    totalAppInstanceCt?: int32(name='TotalAppInstanceCt'),
    totalPartitions?: int32(name='TotalPartitions'),
    userId?: string(name='UserId'),
    userNick?: string(name='UserNick'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribeDeployOrderDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeDeployOrderDetailResponseBody(name='body'),
}

async function describeDeployOrderDetailWithOptions(request: DescribeDeployOrderDetailRequest, runtime: Util.RuntimeOptions): DescribeDeployOrderDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.deployOrderId)) {
    query['DeployOrderId'] = request.deployOrderId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDeployOrderDetail',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDeployOrderDetail(request: DescribeDeployOrderDetailRequest): DescribeDeployOrderDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDeployOrderDetailWithOptions(request, runtime);
}

model DescribeEciConfigRequest {
  appEnvId?: long(name='AppEnvId'),
}

model DescribeEciConfigResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appEnvId?: long(name='AppEnvId'),
    eipBandwidth?: int32(name='EipBandwidth'),
    enableEciSchedulePolicy?: boolean(name='EnableEciSchedulePolicy'),
    mirrorCache?: boolean(name='MirrorCache'),
    normalInstanceLimit?: int32(name='NormalInstanceLimit'),
    scheduleVirtualNode?: boolean(name='ScheduleVirtualNode'),
  }(name='Result'),
}

model DescribeEciConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeEciConfigResponseBody(name='body'),
}

async function describeEciConfigWithOptions(request: DescribeEciConfigRequest, runtime: Util.RuntimeOptions): DescribeEciConfigResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEciConfig',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeEciConfig(request: DescribeEciConfigRequest): DescribeEciConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEciConfigWithOptions(request, runtime);
}

model DescribeEventMonitorListRequest {
  appId?: long(name='AppId'),
  endTime?: long(name='EndTime'),
  envId?: long(name='EnvId'),
  eventLevel?: string(name='EventLevel'),
  eventType?: string(name='EventType'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  podName?: string(name='PodName'),
  startTime?: long(name='StartTime'),
}

model DescribeEventMonitorListResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      count?: int32(name='Count'),
      eventTime?: string(name='EventTime'),
      hostName?: string(name='HostName'),
      kind?: string(name='Kind'),
      level?: string(name='Level'),
      message?: string(name='Message'),
      nameSpace?: string(name='NameSpace'),
      podName?: string(name='PodName'),
      reason?: string(name='Reason'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model DescribeEventMonitorListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeEventMonitorListResponseBody(name='body'),
}

async function describeEventMonitorListWithOptions(request: DescribeEventMonitorListRequest, runtime: Util.RuntimeOptions): DescribeEventMonitorListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.eventLevel)) {
    query['EventLevel'] = request.eventLevel;
  }
  if (!Util.isUnset(request.eventType)) {
    query['EventType'] = request.eventType;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.podName)) {
    query['PodName'] = request.podName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventMonitorList',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeEventMonitorList(request: DescribeEventMonitorListRequest): DescribeEventMonitorListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventMonitorListWithOptions(request, runtime);
}

model DescribeJobLogRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  podName?: string(name='PodName'),
}

model DescribeJobLogResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appId?: long(name='AppId'),
    envId?: long(name='EnvId'),
    events?: [ 
      {
        action?: string(name='Action'),
        count?: int32(name='Count'),
        eventTime?: string(name='EventTime'),
        firstTimestamp?: string(name='FirstTimestamp'),
        lastTimestamp?: string(name='LastTimestamp'),
        mesage?: string(name='Mesage'),
        reason?: string(name='Reason'),
        type?: string(name='Type'),
      }
    ](name='Events'),
    jobLog?: string(name='JobLog'),
    podName?: string(name='PodName'),
  }(name='Result'),
}

model DescribeJobLogResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeJobLogResponseBody(name='body'),
}

async function describeJobLogWithOptions(request: DescribeJobLogRequest, runtime: Util.RuntimeOptions): DescribeJobLogResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeJobLog',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeJobLog(request: DescribeJobLogRequest): DescribeJobLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJobLogWithOptions(request, runtime);
}

model DescribePodContainerLogListRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  line?: int32(name='Line'),
  podName?: string(name='PodName'),
}

model DescribePodContainerLogListResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    containerLogList?: [ 
      {
        containerName?: string(name='ContainerName'),
        content?: string(name='Content'),
        podName?: string(name='PodName'),
      }
    ](name='ContainerLogList'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribePodContainerLogListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribePodContainerLogListResponseBody(name='body'),
}

async function describePodContainerLogListWithOptions(request: DescribePodContainerLogListRequest, runtime: Util.RuntimeOptions): DescribePodContainerLogListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.line)) {
    query['Line'] = request.line;
  }
  if (!Util.isUnset(request.podName)) {
    query['PodName'] = request.podName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePodContainerLogList',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describePodContainerLogList(request: DescribePodContainerLogListRequest): DescribePodContainerLogListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePodContainerLogListWithOptions(request, runtime);
}

model DescribePodEventsRequest {
  appInstId?: string(name='AppInstId'),
  deployOrderId?: long(name='DeployOrderId'),
}

model DescribePodEventsResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    deployOrderName?: string(name='DeployOrderName'),
    podEvents?: [ 
      {
        action?: string(name='Action'),
        count?: int32(name='Count'),
        eventTime?: string(name='EventTime'),
        firstTimestamp?: string(name='FirstTimestamp'),
        lastTimestamp?: string(name='LastTimestamp'),
        message?: string(name='Message'),
        reason?: string(name='Reason'),
        type?: string(name='Type'),
      }
    ](name='PodEvents'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribePodEventsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribePodEventsResponseBody(name='body'),
}

async function describePodEventsWithOptions(request: DescribePodEventsRequest, runtime: Util.RuntimeOptions): DescribePodEventsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appInstId)) {
    query['AppInstId'] = request.appInstId;
  }
  if (!Util.isUnset(request.deployOrderId)) {
    query['DeployOrderId'] = request.deployOrderId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePodEvents',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describePodEvents(request: DescribePodEventsRequest): DescribePodEventsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePodEventsWithOptions(request, runtime);
}

model DescribePodLogRequest {
  appInstId?: string(name='AppInstId'),
  deployOrderId?: long(name='DeployOrderId'),
}

model DescribePodLogResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    deployOrderName?: string(name='DeployOrderName'),
    deployStepList?: [ 
      {
        status?: string(name='Status'),
        stepCode?: string(name='StepCode'),
        stepLog?: string(name='StepLog'),
        stepName?: string(name='StepName'),
      }
    ](name='DeployStepList'),
    envTypeName?: string(name='EnvTypeName'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribePodLogResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribePodLogResponseBody(name='body'),
}

async function describePodLogWithOptions(request: DescribePodLogRequest, runtime: Util.RuntimeOptions): DescribePodLogResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appInstId)) {
    body['AppInstId'] = request.appInstId;
  }
  if (!Util.isUnset(request.deployOrderId)) {
    body['DeployOrderId'] = request.deployOrderId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribePodLog',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describePodLog(request: DescribePodLogRequest): DescribePodLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePodLogWithOptions(request, runtime);
}

model DescribeRdsAccountsRequest {
  accountName?: string(name='AccountName', example='test'),
  dbInstanceId?: string(name='DbInstanceId', example='rm-ul9wjk5xxxxxxx'),
}

model DescribeRdsAccountsResponseBody = {
  code?: int32(name='Code', example='0'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId', example='79a8ab31-32ce-4d27-a006-339a5eae3b6e'),
  result?: {
    accounts?: [ 
      {
        accountDescription?: string(name='AccountDescription'),
        accountName?: string(name='AccountName', example='test'),
        accountStatus?: string(name='AccountStatus', example='Available'),
        accountType?: string(name='AccountType', example='Normal'),
        DBInstanceId?: string(name='DBInstanceId', example='rm-ul9wjk5xxxxxxx'),
        databasePrivileges?: [ 
          {
            accountPrivilege?: string(name='AccountPrivilege', example='ReadWrite'),
            accountPrivilegeDetail?: string(name='AccountPrivilegeDetail', example='SELECT,INSERT'),
            DBName?: string(name='DBName', example='test'),
          }
        ](name='DatabasePrivileges'),
        privExceeded?: string(name='PrivExceeded', example='0'),
      }
    ](name='Accounts'),
  }(name='Result'),
}

model DescribeRdsAccountsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRdsAccountsResponseBody(name='body'),
}

async function describeRdsAccountsWithOptions(request: DescribeRdsAccountsRequest, runtime: Util.RuntimeOptions): DescribeRdsAccountsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRdsAccounts',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRdsAccounts(request: DescribeRdsAccountsRequest): DescribeRdsAccountsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRdsAccountsWithOptions(request, runtime);
}

model DescribeServiceDetailRequest {
  serviceId?: long(name='ServiceId'),
}

model DescribeServiceDetailResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appId?: long(name='AppId'),
    clusterIP?: string(name='ClusterIP'),
    envId?: long(name='EnvId'),
    headless?: boolean(name='Headless'),
    k8sServiceId?: string(name='K8sServiceId'),
    name?: string(name='Name'),
    portMappings?: [ 
      {
        name?: string(name='Name'),
        nodePort?: int32(name='NodePort'),
        port?: int32(name='Port'),
        protocol?: string(name='Protocol'),
        targetPort?: string(name='TargetPort'),
      }
    ](name='PortMappings'),
    serviceId?: long(name='ServiceId'),
    serviceType?: string(name='ServiceType'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribeServiceDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeServiceDetailResponseBody(name='body'),
}

async function describeServiceDetailWithOptions(request: DescribeServiceDetailRequest, runtime: Util.RuntimeOptions): DescribeServiceDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.serviceId)) {
    query['ServiceId'] = request.serviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeServiceDetail',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeServiceDetail(request: DescribeServiceDetailRequest): DescribeServiceDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeServiceDetailWithOptions(request, runtime);
}

model DescribeSlbAPDetailRequest {
  slbAPId?: long(name='SlbAPId'),
}

model DescribeSlbAPDetailResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    appId?: long(name='AppId'),
    cookieTimeout?: int32(name='CookieTimeout'),
    envId?: long(name='EnvId'),
    establishedTimeout?: int32(name='EstablishedTimeout'),
    listenerPort?: int32(name='ListenerPort'),
    name?: string(name='Name'),
    networkMode?: string(name='NetworkMode'),
    protocol?: string(name='Protocol'),
    realServerPort?: int32(name='RealServerPort'),
    slbAPId?: long(name='SlbAPId'),
    slbId?: string(name='SlbId'),
    slbIp?: string(name='SlbIp'),
    sslCertId?: string(name='SslCertId'),
    stickySession?: int32(name='StickySession'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model DescribeSlbAPDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeSlbAPDetailResponseBody(name='body'),
}

async function describeSlbAPDetailWithOptions(request: DescribeSlbAPDetailRequest, runtime: Util.RuntimeOptions): DescribeSlbAPDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.slbAPId)) {
    query['SlbAPId'] = request.slbAPId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSlbAPDetail',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeSlbAPDetail(request: DescribeSlbAPDetailRequest): DescribeSlbAPDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSlbAPDetailWithOptions(request, runtime);
}

model GetInstTransInfoRequest {
  aliyunCommodityCode?: string(name='aliyunCommodityCode'),
  aliyunEquipId?: string(name='aliyunEquipId'),
  aliyunUid?: string(name='aliyunUid'),
}

model GetInstTransInfoResponseBody = {
  chargeType?: string(name='chargeType'),
  endTime?: long(name='endTime'),
  instanceId?: string(name='instanceId'),
  isAutoRenew?: boolean(name='isAutoRenew'),
  renewCycle?: int32(name='renewCycle'),
  startTime?: long(name='startTime'),
}

model GetInstTransInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetInstTransInfoResponseBody(name='body'),
}

async function getInstTransInfoWithOptions(request: GetInstTransInfoRequest, runtime: Util.RuntimeOptions): GetInstTransInfoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.aliyunCommodityCode)) {
    body['aliyunCommodityCode'] = request.aliyunCommodityCode;
  }
  if (!Util.isUnset(request.aliyunEquipId)) {
    body['aliyunEquipId'] = request.aliyunEquipId;
  }
  if (!Util.isUnset(request.aliyunUid)) {
    body['aliyunUid'] = request.aliyunUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetInstTransInfo',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getInstTransInfo(request: GetInstTransInfoRequest): GetInstTransInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getInstTransInfoWithOptions(request, runtime);
}

model GetRdsBackUpRequest {
  backupId?: string(name='BackupId', example='327329803'),
  backupType?: string(name='BackupType', example='FullBackup'),
  dbInstanceId?: string(name='DbInstanceId', example='rm-ul9wjk5xxxxxxx'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='30'),
}

model GetRdsBackUpResponseBody = {
  code?: int32(name='Code', example='0'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId', example='79a8ab31-32ce-4d27-a006-339a5eae3b6e'),
  result?: {
    items?: [ 
      {
        backupDBNames?: string(name='BackupDBNames', example='spdb,sys,test20181221,test-20181228'),
        backupEndTime?: string(name='BackupEndTime', example='2019-02-13T12:20:00Z'),
        backupExtractionStatus?: string(name='BackupExtractionStatus', example='test'),
        backupId?: string(name='BackupId', example='321020562'),
        backupLocation?: string(name='BackupLocation', example='test'),
        backupMethod?: string(name='BackupMethod', example='Physical'),
        backupMode?: string(name='BackupMode', example='Automated'),
        backupScale?: string(name='BackupScale', example='test'),
        backupSize?: long(name='BackupSize', example='2167808'),
        backupStartTime?: string(name='BackupStartTime', example='2019-02-03T12:20:00Z'),
        backupStatus?: string(name='BackupStatus', example='Success'),
        backupType?: string(name='BackupType', example='FullBackup'),
        DBInstanceId?: string(name='DBInstanceId', example='rm-ul9wjk5xxxxxxx'),
        hostInstanceID?: string(name='HostInstanceID', example='5882781'),
        metaStatus?: string(name='MetaStatus', example='OK'),
        storeStatus?: string(name='StoreStatus', example='Disabled'),
        totalBackupSize?: long(name='TotalBackupSize', example='00000'),
      }
    ](name='Items'),
    pageNumber?: string(name='PageNumber', example='1'),
    pageRecordCount?: string(name='PageRecordCount', example='30'),
    totalBackupSize?: long(name='TotalBackupSize', example='8672256'),
    totalRecordCount?: string(name='TotalRecordCount', example='100'),
  }(name='Result'),
}

model GetRdsBackUpResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetRdsBackUpResponseBody(name='body'),
}

async function getRdsBackUpWithOptions(request: GetRdsBackUpRequest, runtime: Util.RuntimeOptions): GetRdsBackUpResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.backupId)) {
    body['BackupId'] = request.backupId;
  }
  if (!Util.isUnset(request.backupType)) {
    body['BackupType'] = request.backupType;
  }
  if (!Util.isUnset(request.dbInstanceId)) {
    body['DbInstanceId'] = request.dbInstanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetRdsBackUp',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getRdsBackUp(request: GetRdsBackUpRequest): GetRdsBackUpResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRdsBackUpWithOptions(request, runtime);
}

model GrantDbToAccountRequest {
  accountName?: string(name='AccountName', example='test'),
  accountPrivilege?: string(name='AccountPrivilege', example='ReadWrite'),
  dbInstanceId?: string(name='DbInstanceId', example='rm-ul9wjk5xxxxxxxxxx'),
  dbName?: string(name='DbName', example='testDB'),
}

model GrantDbToAccountResponseBody = {
  code?: int32(name='Code', example='0'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId', example='79a8ab31-32ce-4d27-a006-339a5eae3b6e'),
}

model GrantDbToAccountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GrantDbToAccountResponseBody(name='body'),
}

async function grantDbToAccountWithOptions(request: GrantDbToAccountRequest, runtime: Util.RuntimeOptions): GrantDbToAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountName)) {
    body['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.accountPrivilege)) {
    body['AccountPrivilege'] = request.accountPrivilege;
  }
  if (!Util.isUnset(request.dbInstanceId)) {
    body['DbInstanceId'] = request.dbInstanceId;
  }
  if (!Util.isUnset(request.dbName)) {
    body['DbName'] = request.dbName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GrantDbToAccount',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function grantDbToAccount(request: GrantDbToAccountRequest): GrantDbToAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return grantDbToAccountWithOptions(request, runtime);
}

model ListAppRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListAppResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      appId?: long(name='AppId'),
      appStateType?: string(name='AppStateType'),
      bizName?: string(name='BizName'),
      bizTitle?: string(name='BizTitle'),
      deployType?: string(name='DeployType'),
      description?: string(name='Description'),
      language?: string(name='Language'),
      middleWareList?: [ 
        {
          appId?: long(name='AppId'),
          code?: int32(name='Code'),
          name?: string(name='Name'),
        }
      ](name='MiddleWareList'),
      operatingSystem?: string(name='OperatingSystem'),
      serviceType?: string(name='ServiceType'),
      title?: string(name='Title'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAppResponseBody(name='body'),
}

async function listAppWithOptions(request: ListAppRequest, runtime: Util.RuntimeOptions): ListAppResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApp',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listApp(request: ListAppRequest): ListAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppWithOptions(request, runtime);
}

model ListAppCmsGroupsRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListAppCmsGroupsResponseBody = {
  code?: int32(name='Code'),
  data?: [ string ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListAppCmsGroupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAppCmsGroupsResponseBody(name='body'),
}

async function listAppCmsGroupsWithOptions(request: ListAppCmsGroupsRequest, runtime: Util.RuntimeOptions): ListAppCmsGroupsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAppCmsGroups',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAppCmsGroups(request: ListAppCmsGroupsRequest): ListAppCmsGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppCmsGroupsWithOptions(request, runtime);
}

model ListAppEnvironmentRequest {
  appId?: long(name='AppId'),
  envName?: string(name='EnvName'),
  envType?: int32(name='EnvType'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListAppEnvironmentResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      appId?: long(name='AppId'),
      appSchemaId?: long(name='AppSchemaId'),
      envId?: long(name='EnvId'),
      envName?: string(name='EnvName'),
      envType?: int32(name='EnvType'),
      envTypeName?: string(name='EnvTypeName'),
      region?: string(name='Region'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListAppEnvironmentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAppEnvironmentResponseBody(name='body'),
}

async function listAppEnvironmentWithOptions(request: ListAppEnvironmentRequest, runtime: Util.RuntimeOptions): ListAppEnvironmentResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAppEnvironment',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAppEnvironment(request: ListAppEnvironmentRequest): ListAppEnvironmentResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppEnvironmentWithOptions(request, runtime);
}

model ListAppGroupRequest {
  bizCode?: string(name='BizCode'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListAppGroupResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      bizName?: string(name='BizName'),
      id?: long(name='Id'),
      name?: string(name='Name'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListAppGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAppGroupResponseBody(name='body'),
}

async function listAppGroupWithOptions(request: ListAppGroupRequest, runtime: Util.RuntimeOptions): ListAppGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizCode)) {
    query['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAppGroup',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAppGroup(request: ListAppGroupRequest): ListAppGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppGroupWithOptions(request, runtime);
}

model ListAppGroupMappingRequest {
  bizCode?: string(name='BizCode'),
  name?: string(name='Name'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListAppGroupMappingResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      appId?: long(name='AppId'),
      groupId?: long(name='GroupId'),
      id?: long(name='Id'),
      name?: string(name='Name'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListAppGroupMappingResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAppGroupMappingResponseBody(name='body'),
}

async function listAppGroupMappingWithOptions(request: ListAppGroupMappingRequest, runtime: Util.RuntimeOptions): ListAppGroupMappingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizCode)) {
    query['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAppGroupMapping',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAppGroupMapping(request: ListAppGroupMappingRequest): ListAppGroupMappingResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppGroupMappingWithOptions(request, runtime);
}

model ListAppInstanceRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListAppInstanceResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      appInstanceId?: string(name='AppInstanceId'),
      createTime?: string(name='CreateTime'),
      health?: string(name='Health'),
      hostIp?: string(name='HostIp'),
      limits?: string(name='Limits'),
      podIp?: string(name='PodIp'),
      requests?: string(name='Requests'),
      restartCount?: int32(name='RestartCount'),
      spec?: string(name='Spec'),
      status?: string(name='Status'),
      version?: string(name='Version'),
    }
  ](name='Data'),
  errMsg?: string(name='ErrMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListAppInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAppInstanceResponseBody(name='body'),
}

async function listAppInstanceWithOptions(request: ListAppInstanceRequest, runtime: Util.RuntimeOptions): ListAppInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envId)) {
    body['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListAppInstance',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAppInstance(request: ListAppInstanceRequest): ListAppInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppInstanceWithOptions(request, runtime);
}

model ListAppResourceAllocsRequest {
  appEnvId?: long(name='AppEnvId'),
  appId?: long(name='AppId'),
  clusterId?: string(name='ClusterId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListAppResourceAllocsResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      appEnvId?: long(name='AppEnvId'),
      appId?: long(name='AppId'),
      clusterId?: string(name='ClusterId'),
      id?: long(name='Id'),
      resourceDef?: string(name='ResourceDef'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListAppResourceAllocsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAppResourceAllocsResponseBody(name='body'),
}

async function listAppResourceAllocsWithOptions(request: ListAppResourceAllocsRequest, runtime: Util.RuntimeOptions): ListAppResourceAllocsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAppResourceAllocs',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAppResourceAllocs(request: ListAppResourceAllocsRequest): ListAppResourceAllocsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAppResourceAllocsWithOptions(request, runtime);
}

model ListAvailableClusterNodeRequest {
  clusterInstanceId?: string(name='ClusterInstanceId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
}

model ListAvailableClusterNodeResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      businessCode?: string(name='BusinessCode'),
      ecsConfiguration?: string(name='EcsConfiguration'),
      ecsCpu?: string(name='EcsCpu'),
      ecsEip?: string(name='EcsEip'),
      ecsExpiredTime?: string(name='EcsExpiredTime'),
      ecsLocalStorageCapacity?: string(name='EcsLocalStorageCapacity'),
      ecsMemory?: string(name='EcsMemory'),
      ecsOsType?: string(name='EcsOsType'),
      ecsPrivateIp?: string(name='EcsPrivateIp'),
      ecsPublicIp?: string(name='EcsPublicIp'),
      ecsZone?: string(name='EcsZone'),
      instanceId?: string(name='InstanceId'),
      instanceName?: string(name='InstanceName'),
      instanceNetworkType?: string(name='InstanceNetworkType'),
      instanceType?: string(name='InstanceType'),
      internetMaxBandwidthIn?: string(name='InternetMaxBandwidthIn'),
      internetMaxBandwidthOut?: string(name='InternetMaxBandwidthOut'),
      OSName?: string(name='OSName'),
      regionId?: string(name='RegionId'),
      vpcId?: string(name='VpcId'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListAvailableClusterNodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAvailableClusterNodeResponseBody(name='body'),
}

async function listAvailableClusterNodeWithOptions(request: ListAvailableClusterNodeRequest, runtime: Util.RuntimeOptions): ListAvailableClusterNodeResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAvailableClusterNode',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAvailableClusterNode(request: ListAvailableClusterNodeRequest): ListAvailableClusterNodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAvailableClusterNodeWithOptions(request, runtime);
}

model ListClusterRequest {
  businessCode?: string(name='BusinessCode'),
  envType?: string(name='EnvType'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
}

model ListClusterResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      businessCode?: string(name='BusinessCode'),
      clusterTitle?: string(name='ClusterTitle'),
      createStatus?: string(name='CreateStatus'),
      ecsIds?: [ string ](name='EcsIds'),
      envType?: string(name='EnvType'),
      id?: long(name='Id'),
      instanceId?: string(name='InstanceId'),
      keyPair?: string(name='KeyPair'),
      netPlug?: string(name='NetPlug'),
      password?: string(name='Password'),
      podCIDR?: string(name='PodCIDR'),
      regionId?: string(name='RegionId'),
      regionName?: string(name='RegionName'),
      serviceCIDR?: string(name='ServiceCIDR'),
      status?: string(name='Status'),
      vpcId?: string(name='VpcId'),
      vswitchIds?: [ string ](name='VswitchIds'),
      workLoadCpu?: string(name='WorkLoadCpu'),
      workLoadMem?: string(name='WorkLoadMem'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListClusterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListClusterResponseBody(name='body'),
}

async function listClusterWithOptions(request: ListClusterRequest, runtime: Util.RuntimeOptions): ListClusterResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListCluster',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listCluster(request: ListClusterRequest): ListClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterWithOptions(request, runtime);
}

model ListClusterNodeRequest {
  clusterInstanceId?: string(name='ClusterInstanceId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
}

model ListClusterNodeResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      businessCode?: string(name='BusinessCode'),
      ecsConfiguration?: string(name='EcsConfiguration'),
      ecsCpu?: string(name='EcsCpu'),
      ecsEip?: string(name='EcsEip'),
      ecsExpiredTime?: string(name='EcsExpiredTime'),
      ecsLocalStorageCapacity?: string(name='EcsLocalStorageCapacity'),
      ecsMemory?: string(name='EcsMemory'),
      ecsOsType?: string(name='EcsOsType'),
      ecsPrivateIp?: string(name='EcsPrivateIp'),
      ecsPublicIp?: string(name='EcsPublicIp'),
      ecsZone?: string(name='EcsZone'),
      instanceId?: string(name='InstanceId'),
      instanceName?: string(name='InstanceName'),
      instanceNetworkType?: string(name='InstanceNetworkType'),
      instanceType?: string(name='InstanceType'),
      internetMaxBandwidthIn?: string(name='InternetMaxBandwidthIn'),
      internetMaxBandwidthOut?: string(name='InternetMaxBandwidthOut'),
      OSName?: string(name='OSName'),
      regionId?: string(name='RegionId'),
      vpcId?: string(name='VpcId'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListClusterNodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListClusterNodeResponseBody(name='body'),
}

async function listClusterNodeWithOptions(request: ListClusterNodeRequest, runtime: Util.RuntimeOptions): ListClusterNodeResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterNode',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterNode(request: ListClusterNodeRequest): ListClusterNodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterNodeWithOptions(request, runtime);
}

model ListDeployConfigRequest {
  appId?: long(name='AppId'),
  envType?: string(name='EnvType'),
  id?: long(name='Id'),
  name?: string(name='Name'),
}

model ListDeployConfigResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      appId?: long(name='AppId'),
      containerCodePath?: {
        codePath?: string(name='CodePath'),
      }(name='ContainerCodePath'),
      containerResourceLimit?: {
        cpu?: string(name='Cpu'),
        gpu?: string(name='Gpu'),
        memory?: string(name='Memory'),
        storage?: string(name='Storage'),
      }(name='ContainerResourceLimit'),
      containerResourceRequest?: {
        cpu?: string(name='Cpu'),
        gpu?: string(name='Gpu'),
        memory?: string(name='Memory'),
        storage?: string(name='Storage'),
      }(name='ContainerResourceRequest'),
      containerYamlConf?: {
        configMap?: string(name='ConfigMap'),
        configMapList?: [ string ](name='ConfigMapList'),
        cronJob?: string(name='CronJob'),
        deployment?: string(name='Deployment'),
        secretList?: [ string ](name='SecretList'),
        statefulSet?: string(name='StatefulSet'),
      }(name='ContainerYamlConf'),
      envType?: string(name='EnvType'),
      id?: long(name='Id'),
      name?: string(name='Name'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListDeployConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDeployConfigResponseBody(name='body'),
}

async function listDeployConfigWithOptions(request: ListDeployConfigRequest, runtime: Util.RuntimeOptions): ListDeployConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envType)) {
    query['EnvType'] = request.envType;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeployConfig',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDeployConfig(request: ListDeployConfigRequest): ListDeployConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeployConfigWithOptions(request, runtime);
}

model ListDeployOrdersRequest {
  appId?: long(name='AppId'),
  deployCategory?: string(name='DeployCategory'),
  deployType?: string(name='DeployType'),
  endTimeGreaterThan?: string(name='EndTimeGreaterThan'),
  endTimeGreaterThanOrEqualTo?: string(name='EndTimeGreaterThanOrEqualTo'),
  endTimeLessThan?: string(name='EndTimeLessThan'),
  endTimeLessThanOrEqualTo?: string(name='EndTimeLessThanOrEqualTo'),
  envId?: long(name='EnvId'),
  envType?: string(name='EnvType'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  partitionType?: string(name='PartitionType'),
  pauseType?: string(name='PauseType'),
  resultList?: [ int32 ](name='ResultList'),
  startTimeGreaterThan?: string(name='StartTimeGreaterThan'),
  startTimeGreaterThanOrEqualTo?: string(name='StartTimeGreaterThanOrEqualTo'),
  startTimeLessThan?: string(name='StartTimeLessThan'),
  startTimeLessThanOrEqualTo?: string(name='StartTimeLessThanOrEqualTo'),
  status?: int32(name='Status'),
  statusList?: [ int32 ](name='StatusList'),
}

model ListDeployOrdersResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      appInstanceType?: string(name='AppInstanceType'),
      currentPartitionNum?: int32(name='CurrentPartitionNum'),
      deployOrderId?: long(name='DeployOrderId'),
      deployPauseType?: string(name='DeployPauseType'),
      deployPauseTypeName?: string(name='DeployPauseTypeName'),
      deployType?: string(name='DeployType'),
      deployTypeName?: string(name='DeployTypeName'),
      description?: string(name='Description'),
      elapsedTime?: int32(name='ElapsedTime'),
      endTime?: string(name='EndTime'),
      envId?: long(name='EnvId'),
      envType?: string(name='EnvType'),
      failureRate?: string(name='FailureRate'),
      finishAppInstanceCt?: int32(name='FinishAppInstanceCt'),
      name?: string(name='Name'),
      partitionType?: string(name='PartitionType'),
      partitionTypeName?: string(name='PartitionTypeName'),
      result?: int32(name='Result'),
      resultName?: string(name='ResultName'),
      schemaId?: long(name='SchemaId'),
      startTime?: string(name='StartTime'),
      status?: int32(name='Status'),
      statusName?: string(name='StatusName'),
      totalAppInstanceCt?: int32(name='TotalAppInstanceCt'),
      totalPartitions?: int32(name='TotalPartitions'),
      userId?: string(name='UserId'),
      userNick?: string(name='UserNick'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListDeployOrdersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDeployOrdersResponseBody(name='body'),
}

async function listDeployOrdersWithOptions(request: ListDeployOrdersRequest, runtime: Util.RuntimeOptions): ListDeployOrdersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.deployCategory)) {
    query['DeployCategory'] = request.deployCategory;
  }
  if (!Util.isUnset(request.deployType)) {
    query['DeployType'] = request.deployType;
  }
  if (!Util.isUnset(request.endTimeGreaterThan)) {
    query['EndTimeGreaterThan'] = request.endTimeGreaterThan;
  }
  if (!Util.isUnset(request.endTimeGreaterThanOrEqualTo)) {
    query['EndTimeGreaterThanOrEqualTo'] = request.endTimeGreaterThanOrEqualTo;
  }
  if (!Util.isUnset(request.endTimeLessThan)) {
    query['EndTimeLessThan'] = request.endTimeLessThan;
  }
  if (!Util.isUnset(request.endTimeLessThanOrEqualTo)) {
    query['EndTimeLessThanOrEqualTo'] = request.endTimeLessThanOrEqualTo;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.envType)) {
    query['EnvType'] = request.envType;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.partitionType)) {
    query['PartitionType'] = request.partitionType;
  }
  if (!Util.isUnset(request.pauseType)) {
    query['PauseType'] = request.pauseType;
  }
  if (!Util.isUnset(request.startTimeGreaterThan)) {
    query['StartTimeGreaterThan'] = request.startTimeGreaterThan;
  }
  if (!Util.isUnset(request.startTimeGreaterThanOrEqualTo)) {
    query['StartTimeGreaterThanOrEqualTo'] = request.startTimeGreaterThanOrEqualTo;
  }
  if (!Util.isUnset(request.startTimeLessThan)) {
    query['StartTimeLessThan'] = request.startTimeLessThan;
  }
  if (!Util.isUnset(request.startTimeLessThanOrEqualTo)) {
    query['StartTimeLessThanOrEqualTo'] = request.startTimeLessThanOrEqualTo;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.resultList)) {
    body['ResultList'] = request.resultList;
  }
  if (!Util.isUnset(request.statusList)) {
    body['StatusList'] = request.statusList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListDeployOrders',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDeployOrders(request: ListDeployOrdersRequest): ListDeployOrdersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeployOrdersWithOptions(request, runtime);
}

model ListJobHistoriesRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  status?: string(name='Status'),
}

model ListJobHistoriesResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      activeDeadlineSeconds?: int32(name='ActiveDeadlineSeconds'),
      backoffLimit?: int32(name='BackoffLimit'),
      completionTime?: string(name='CompletionTime'),
      completions?: int32(name='Completions'),
      failed?: int32(name='Failed'),
      message?: string(name='Message'),
      name?: string(name='Name'),
      parallelism?: int32(name='Parallelism'),
      podList?: [ string ](name='PodList'),
      startTime?: string(name='StartTime'),
      succeeded?: int32(name='Succeeded'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListJobHistoriesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListJobHistoriesResponseBody(name='body'),
}

async function listJobHistoriesWithOptions(request: ListJobHistoriesRequest, runtime: Util.RuntimeOptions): ListJobHistoriesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListJobHistories',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listJobHistories(request: ListJobHistoriesRequest): ListJobHistoriesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listJobHistoriesWithOptions(request, runtime);
}

model ListNodeLabelBindingsRequest {
  clusterId?: string(name='ClusterId'),
  instanceId?: string(name='InstanceId'),
  labelKey?: string(name='LabelKey'),
  labelValue?: string(name='LabelValue'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListNodeLabelBindingsResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      id?: long(name='Id'),
      instanceId?: string(name='InstanceId'),
      instanceType?: string(name='InstanceType'),
      labelKey?: string(name='LabelKey'),
      labelValue?: string(name='LabelValue'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListNodeLabelBindingsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListNodeLabelBindingsResponseBody(name='body'),
}

async function listNodeLabelBindingsWithOptions(request: ListNodeLabelBindingsRequest, runtime: Util.RuntimeOptions): ListNodeLabelBindingsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListNodeLabelBindings',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listNodeLabelBindings(request: ListNodeLabelBindingsRequest): ListNodeLabelBindingsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNodeLabelBindingsWithOptions(request, runtime);
}

model ListNodeLabelsRequest {
  clusterId?: string(name='ClusterId'),
  labelKey?: string(name='LabelKey'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListNodeLabelsResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      clusterId?: string(name='ClusterId'),
      id?: long(name='Id'),
      labelKey?: string(name='LabelKey'),
      labelValue?: string(name='LabelValue'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListNodeLabelsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListNodeLabelsResponseBody(name='body'),
}

async function listNodeLabelsWithOptions(request: ListNodeLabelsRequest, runtime: Util.RuntimeOptions): ListNodeLabelsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.labelKey)) {
    query['LabelKey'] = request.labelKey;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListNodeLabels',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listNodeLabels(request: ListNodeLabelsRequest): ListNodeLabelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNodeLabelsWithOptions(request, runtime);
}

model ListPersistentVolumeRequest {
  clusterInstanceId?: string(name='ClusterInstanceId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListPersistentVolumeResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      accessModes?: string(name='AccessModes'),
      capacity?: string(name='Capacity'),
      createTime?: string(name='CreateTime'),
      mountDir?: string(name='MountDir'),
      name?: string(name='Name'),
      pvcName?: string(name='PvcName'),
      reason?: string(name='Reason'),
      reclaimPolicy?: string(name='ReclaimPolicy'),
      status?: string(name='Status'),
      storageClass?: string(name='StorageClass'),
    }
  ](name='Data'),
  errMsg?: string(name='ErrMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListPersistentVolumeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPersistentVolumeResponseBody(name='body'),
}

async function listPersistentVolumeWithOptions(request: ListPersistentVolumeRequest, runtime: Util.RuntimeOptions): ListPersistentVolumeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clusterInstanceId)) {
    body['ClusterInstanceId'] = request.clusterInstanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListPersistentVolume',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPersistentVolume(request: ListPersistentVolumeRequest): ListPersistentVolumeResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPersistentVolumeWithOptions(request, runtime);
}

model ListPersistentVolumeClaimRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListPersistentVolumeClaimResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      accessModes?: string(name='AccessModes'),
      capacity?: string(name='Capacity'),
      createTime?: string(name='CreateTime'),
      name?: string(name='Name'),
      status?: string(name='Status'),
      storageClass?: string(name='StorageClass'),
      volumeName?: string(name='VolumeName'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListPersistentVolumeClaimResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPersistentVolumeClaimResponseBody(name='body'),
}

async function listPersistentVolumeClaimWithOptions(request: ListPersistentVolumeClaimRequest, runtime: Util.RuntimeOptions): ListPersistentVolumeClaimResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPersistentVolumeClaim',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPersistentVolumeClaim(request: ListPersistentVolumeClaimRequest): ListPersistentVolumeClaimResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPersistentVolumeClaimWithOptions(request, runtime);
}

model ListPodsRequest {
  deployOrderId?: long(name='DeployOrderId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  resultList?: [ int32 ](name='ResultList'),
  statusList?: [ int32 ](name='StatusList'),
}

model ListPodsResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      appInstanceId?: string(name='AppInstanceId'),
      deployOrderId?: long(name='DeployOrderId'),
      deployPartitionNum?: int32(name='DeployPartitionNum'),
      deploySteps?: [ 
        {
          status?: string(name='Status'),
          stepCode?: string(name='StepCode'),
          stepName?: string(name='StepName'),
        }
      ](name='DeploySteps'),
      groupName?: string(name='GroupName'),
      hostIp?: string(name='HostIp'),
      hostName?: string(name='HostName'),
      podIp?: string(name='PodIp'),
      region?: string(name='Region'),
      result?: int32(name='Result'),
      resultName?: string(name='ResultName'),
      startTime?: string(name='StartTime'),
      status?: int32(name='Status'),
      statusName?: string(name='StatusName'),
      updateTime?: string(name='UpdateTime'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListPodsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPodsResponseBody(name='body'),
}

async function listPodsWithOptions(request: ListPodsRequest, runtime: Util.RuntimeOptions): ListPodsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.deployOrderId)) {
    query['DeployOrderId'] = request.deployOrderId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.resultList)) {
    body['ResultList'] = request.resultList;
  }
  if (!Util.isUnset(request.statusList)) {
    body['StatusList'] = request.statusList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListPods',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPods(request: ListPodsRequest): ListPodsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPodsWithOptions(request, runtime);
}

model ListServicesRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  name?: string(name='Name'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  serviceType?: string(name='ServiceType'),
}

model ListServicesResponseBody = {
  clusterIP?: string(name='ClusterIP'),
  code?: int32(name='Code'),
  data?: [ 
    {
      appId?: long(name='AppId'),
      clusterIP?: string(name='ClusterIP'),
      envId?: long(name='EnvId'),
      headless?: boolean(name='Headless'),
      k8sServiceId?: string(name='K8sServiceId'),
      name?: string(name='Name'),
      portMappings?: [ 
        {
          name?: string(name='Name'),
          nodePort?: int32(name='NodePort'),
          port?: int32(name='Port'),
          protocol?: string(name='Protocol'),
          targetPort?: string(name='TargetPort'),
        }
      ](name='PortMappings'),
      serviceId?: long(name='ServiceId'),
      serviceType?: string(name='ServiceType'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListServicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListServicesResponseBody(name='body'),
}

async function listServicesWithOptions(request: ListServicesRequest, runtime: Util.RuntimeOptions): ListServicesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.serviceType)) {
    query['ServiceType'] = request.serviceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListServices',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listServices(request: ListServicesRequest): ListServicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listServicesWithOptions(request, runtime);
}

model ListSlbAPsRequest {
  appId?: long(name='AppId'),
  envId?: long(name='EnvId'),
  name?: string(name='Name'),
  networkMode?: string(name='NetworkMode'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  protocolList?: [ string ](name='ProtocolList'),
  slbId?: string(name='SlbId'),
}

model ListSlbAPsResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      appId?: long(name='AppId'),
      cookieTimeout?: int32(name='CookieTimeout'),
      envId?: long(name='EnvId'),
      establishedTimeout?: int32(name='EstablishedTimeout'),
      listenerPort?: int32(name='ListenerPort'),
      name?: string(name='Name'),
      networkMode?: string(name='NetworkMode'),
      protocol?: string(name='Protocol'),
      realServerPort?: int32(name='RealServerPort'),
      slbAPId?: long(name='SlbAPId'),
      slbId?: string(name='SlbId'),
      slbIp?: string(name='SlbIp'),
      sslCertId?: string(name='SslCertId'),
      stickySession?: int32(name='StickySession'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListSlbAPsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListSlbAPsResponseBody(name='body'),
}

async function listSlbAPsWithOptions(request: ListSlbAPsRequest, runtime: Util.RuntimeOptions): ListSlbAPsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.networkMode)) {
    query['NetworkMode'] = request.networkMode;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.slbId)) {
    query['SlbId'] = request.slbId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.protocolList)) {
    body['ProtocolList'] = request.protocolList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListSlbAPs',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listSlbAPs(request: ListSlbAPsRequest): ListSlbAPsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSlbAPsWithOptions(request, runtime);
}

model ListUsersRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListUsersResponseBody = {
  code?: int32(name='Code'),
  data?: [ 
    {
      realName?: string(name='RealName'),
      userId?: string(name='UserId'),
      userType?: string(name='UserType'),
    }
  ](name='Data'),
  errorMsg?: string(name='ErrorMsg'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListUsersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListUsersResponseBody(name='body'),
}

async function listUsersWithOptions(request: ListUsersRequest, runtime: Util.RuntimeOptions): ListUsersResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUsers',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listUsers(request: ListUsersRequest): ListUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUsersWithOptions(request, runtime);
}

model ModifyServiceRequest {
  name?: string(name='Name'),
  portMappings?: [ 
    {
      name?: string(name='Name'),
      nodePort?: int32(name='NodePort'),
      port?: int32(name='Port'),
      protocol?: string(name='Protocol'),
      targetPort?: string(name='TargetPort'),
    }
  ](name='PortMappings'),
  serviceId?: long(name='ServiceId'),
}

model ModifyServiceResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ModifyServiceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyServiceResponseBody(name='body'),
}

async function modifyServiceWithOptions(request: ModifyServiceRequest, runtime: Util.RuntimeOptions): ModifyServiceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.serviceId)) {
    query['ServiceId'] = request.serviceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.portMappings)) {
    body['PortMappings'] = request.portMappings;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyService',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyService(request: ModifyServiceRequest): ModifyServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyServiceWithOptions(request, runtime);
}

model ModifySlbAPRequest {
  cookieTimeout?: int32(name='CookieTimeout'),
  establishedTimeout?: int32(name='EstablishedTimeout'),
  name?: string(name='Name'),
  realServerPort?: int32(name='RealServerPort'),
  slbAPId?: long(name='SlbAPId'),
  sslCertId?: string(name='SslCertId'),
  stickySession?: int32(name='StickySession'),
}

model ModifySlbAPResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ModifySlbAPResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifySlbAPResponseBody(name='body'),
}

async function modifySlbAPWithOptions(request: ModifySlbAPRequest, runtime: Util.RuntimeOptions): ModifySlbAPResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cookieTimeout)) {
    query['CookieTimeout'] = request.cookieTimeout;
  }
  if (!Util.isUnset(request.establishedTimeout)) {
    query['EstablishedTimeout'] = request.establishedTimeout;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.realServerPort)) {
    query['RealServerPort'] = request.realServerPort;
  }
  if (!Util.isUnset(request.slbAPId)) {
    query['SlbAPId'] = request.slbAPId;
  }
  if (!Util.isUnset(request.sslCertId)) {
    query['SslCertId'] = request.sslCertId;
  }
  if (!Util.isUnset(request.stickySession)) {
    query['StickySession'] = request.stickySession;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifySlbAP',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifySlbAP(request: ModifySlbAPRequest): ModifySlbAPResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifySlbAPWithOptions(request, runtime);
}

model OfflineAppEnvironmentRequest {
  appId?: long(name='AppId'),
  deletePvc?: boolean(name='DeletePvc'),
  envId?: long(name='EnvId'),
}

model OfflineAppEnvironmentResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model OfflineAppEnvironmentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: OfflineAppEnvironmentResponseBody(name='body'),
}

async function offlineAppEnvironmentWithOptions(request: OfflineAppEnvironmentRequest, runtime: Util.RuntimeOptions): OfflineAppEnvironmentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.deletePvc)) {
    query['DeletePvc'] = request.deletePvc;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'OfflineAppEnvironment',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function offlineAppEnvironment(request: OfflineAppEnvironmentRequest): OfflineAppEnvironmentResponse {
  var runtime = new Util.RuntimeOptions{};
  return offlineAppEnvironmentWithOptions(request, runtime);
}

model QueryClusterDetailRequest {
  clusterInstanceId?: string(name='ClusterInstanceId'),
}

model QueryClusterDetailResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    basicInfo?: {
      businessCode?: string(name='BusinessCode'),
      clusterId?: long(name='ClusterId'),
      clusterInstanceId?: string(name='ClusterInstanceId'),
      clusterName?: string(name='ClusterName'),
      ecsIds?: [ string ](name='EcsIds'),
      envType?: string(name='EnvType'),
      hasInstallArmsPilot?: boolean(name='HasInstallArmsPilot'),
      hasInstallLogController?: boolean(name='HasInstallLogController'),
      installArmsInProcess?: boolean(name='InstallArmsInProcess'),
      installLogInProcess?: boolean(name='InstallLogInProcess'),
      mainUserId?: string(name='MainUserId'),
      regionId?: string(name='RegionId'),
      regionName?: string(name='RegionName'),
      userNick?: string(name='UserNick'),
      vpcId?: string(name='VpcId'),
      vswitchs?: [ string ](name='Vswitchs'),
    }(name='BasicInfo'),
    instanceInfo?: {
      allocatePodCount?: int32(name='AllocatePodCount'),
      allocatedPodInfoList?: [ string ](name='AllocatedPodInfoList'),
      appCount?: int32(name='AppCount'),
      availablePodInfoList?: [ string ](name='AvailablePodInfoList'),
    }(name='InstanceInfo'),
    netInfo?: {
      netPlugType?: string(name='NetPlugType'),
      prodCIDR?: string(name='ProdCIDR'),
      serviceCIDR?: string(name='ServiceCIDR'),
    }(name='NetInfo'),
    nodeWorkLoadList?: [ string ](name='NodeWorkLoadList'),
    workLoad?: {
      allNodeCount?: int32(name='AllNodeCount'),
      allocateAllPodCount?: int32(name='AllocateAllPodCount'),
      allocateAppPodCount?: int32(name='AllocateAppPodCount'),
      cpuCapacityTotal?: string(name='CpuCapacityTotal'),
      cpuLevel?: string(name='CpuLevel'),
      cpuRequest?: string(name='CpuRequest'),
      cpuRequestPercent?: string(name='CpuRequestPercent'),
      cpuTotal?: string(name='CpuTotal'),
      cpuUse?: string(name='CpuUse'),
      cpuUsePercent?: string(name='CpuUsePercent'),
      memCapacityTotal?: string(name='MemCapacityTotal'),
      memLevel?: string(name='MemLevel'),
      memRequest?: string(name='MemRequest'),
      memRequestPercent?: string(name='MemRequestPercent'),
      memTotal?: string(name='MemTotal'),
      memUse?: string(name='MemUse'),
      memUsePercent?: string(name='MemUsePercent'),
    }(name='WorkLoad'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model QueryClusterDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryClusterDetailResponseBody(name='body'),
}

async function queryClusterDetailWithOptions(request: QueryClusterDetailRequest, runtime: Util.RuntimeOptions): QueryClusterDetailResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryClusterDetail',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryClusterDetail(request: QueryClusterDetailRequest): QueryClusterDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryClusterDetailWithOptions(request, runtime);
}

model RebuildAppInstanceRequest {
  appId?: long(name='AppId'),
  appInstanceId?: string(name='AppInstanceId'),
  envId?: long(name='EnvId'),
}

model RebuildAppInstanceResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model RebuildAppInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RebuildAppInstanceResponseBody(name='body'),
}

async function rebuildAppInstanceWithOptions(request: RebuildAppInstanceRequest, runtime: Util.RuntimeOptions): RebuildAppInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appInstanceId)) {
    query['AppInstanceId'] = request.appInstanceId;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RebuildAppInstance',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function rebuildAppInstance(request: RebuildAppInstanceRequest): RebuildAppInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return rebuildAppInstanceWithOptions(request, runtime);
}

model RemoveClusterNodeRequest {
  clusterInstanceId?: string(name='ClusterInstanceId'),
  ecsInstanceIdList?: [ string ](name='EcsInstanceIdList'),
}

model RemoveClusterNodeResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    nonsense?: int32(name='Nonsense'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model RemoveClusterNodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RemoveClusterNodeResponseBody(name='body'),
}

async function removeClusterNodeWithOptions(request: RemoveClusterNodeRequest, runtime: Util.RuntimeOptions): RemoveClusterNodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterInstanceId)) {
    query['ClusterInstanceId'] = request.clusterInstanceId;
  }
  if (!Util.isUnset(request.ecsInstanceIdList)) {
    query['EcsInstanceIdList'] = request.ecsInstanceIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveClusterNode',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function removeClusterNode(request: RemoveClusterNodeRequest): RemoveClusterNodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeClusterNodeWithOptions(request, runtime);
}

model ResetAccountPasswordRequest {
  accountName?: string(name='AccountName'),
  accountPassword?: string(name='AccountPassword'),
  dbInstanceId?: string(name='DbInstanceId'),
}

model ResetAccountPasswordResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
}

model ResetAccountPasswordResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ResetAccountPasswordResponseBody(name='body'),
}

async function resetAccountPasswordWithOptions(request: ResetAccountPasswordRequest, runtime: Util.RuntimeOptions): ResetAccountPasswordResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountName)) {
    body['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.accountPassword)) {
    body['AccountPassword'] = request.accountPassword;
  }
  if (!Util.isUnset(request.dbInstanceId)) {
    body['DbInstanceId'] = request.dbInstanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ResetAccountPassword',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function resetAccountPassword(request: ResetAccountPasswordRequest): ResetAccountPasswordResponse {
  var runtime = new Util.RuntimeOptions{};
  return resetAccountPasswordWithOptions(request, runtime);
}

model ResourceStatusNotifyRequest {
  data?: string(name='data'),
}

model ResourceStatusNotifyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
}

async function resourceStatusNotifyWithOptions(request: ResourceStatusNotifyRequest, runtime: Util.RuntimeOptions): ResourceStatusNotifyResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.data)) {
    body['data'] = request.data;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ResourceStatusNotify',
    version = '2018-03-13',
    protocol = 'HTTP',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'none',
  };
  return callApi(params, req, runtime);
}

async function resourceStatusNotify(request: ResourceStatusNotifyRequest): ResourceStatusNotifyResponse {
  var runtime = new Util.RuntimeOptions{};
  return resourceStatusNotifyWithOptions(request, runtime);
}

model RestartAppInstanceRequest {
  appId?: long(name='AppId'),
  appInstanceIdList?: [ long ](name='AppInstanceIdList'),
  envId?: long(name='EnvId'),
}

model RestartAppInstanceResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: string(name='Result'),
}

model RestartAppInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RestartAppInstanceResponseBody(name='body'),
}

async function restartAppInstanceWithOptions(request: RestartAppInstanceRequest, runtime: Util.RuntimeOptions): RestartAppInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appInstanceIdList)) {
    query['AppInstanceIdList'] = request.appInstanceIdList;
  }
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RestartAppInstance',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function restartAppInstance(request: RestartAppInstanceRequest): RestartAppInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return restartAppInstanceWithOptions(request, runtime);
}

model ResumeDeployRequest {
  deployOrderId?: long(name='DeployOrderId'),
}

model ResumeDeployResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model ResumeDeployResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ResumeDeployResponseBody(name='body'),
}

async function resumeDeployWithOptions(request: ResumeDeployRequest, runtime: Util.RuntimeOptions): ResumeDeployResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.deployOrderId)) {
    query['DeployOrderId'] = request.deployOrderId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResumeDeploy',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function resumeDeploy(request: ResumeDeployRequest): ResumeDeployResponse {
  var runtime = new Util.RuntimeOptions{};
  return resumeDeployWithOptions(request, runtime);
}

model ScaleAppRequest {
  envId?: long(name='EnvId'),
  replicas?: int32(name='Replicas'),
  totalPartitions?: int32(name='TotalPartitions'),
}

model ScaleAppResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    admitted?: boolean(name='Admitted'),
    businessCode?: string(name='BusinessCode'),
    deployOrderId?: long(name='DeployOrderId'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model ScaleAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ScaleAppResponseBody(name='body'),
}

async function scaleAppWithOptions(request: ScaleAppRequest, runtime: Util.RuntimeOptions): ScaleAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.envId)) {
    query['EnvId'] = request.envId;
  }
  if (!Util.isUnset(request.replicas)) {
    query['Replicas'] = request.replicas;
  }
  if (!Util.isUnset(request.totalPartitions)) {
    query['TotalPartitions'] = request.totalPartitions;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ScaleApp',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function scaleApp(request: ScaleAppRequest): ScaleAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return scaleAppWithOptions(request, runtime);
}

model SetDeployPauseTypeRequest {
  deployOrderId?: long(name='DeployOrderId'),
  deployPauseType?: string(name='DeployPauseType'),
}

model SetDeployPauseTypeResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model SetDeployPauseTypeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetDeployPauseTypeResponseBody(name='body'),
}

async function setDeployPauseTypeWithOptions(request: SetDeployPauseTypeRequest, runtime: Util.RuntimeOptions): SetDeployPauseTypeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.deployOrderId)) {
    query['DeployOrderId'] = request.deployOrderId;
  }
  if (!Util.isUnset(request.deployPauseType)) {
    query['DeployPauseType'] = request.deployPauseType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDeployPauseType',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setDeployPauseType(request: SetDeployPauseTypeRequest): SetDeployPauseTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDeployPauseTypeWithOptions(request, runtime);
}

model SubmitInfoRequest {
  callerUid?: long(name='CallerUid'),
  ecsDescList?: [ 
    {
      appType?: string(name='AppType'),
      bussinessDesc?: string(name='BussinessDesc'),
      bussinessType?: string(name='BussinessType'),
      envType?: string(name='EnvType'),
      middleWareDesc?: string(name='MiddleWareDesc'),
      otherMiddleWareDesc?: string(name='OtherMiddleWareDesc'),
      resourceId?: string(name='ResourceId'),
      userId?: string(name='UserId'),
    }
  ](name='EcsDescList'),
  mainUserId?: long(name='MainUserId'),
  requestId?: string(name='RequestId'),
}

model SubmitInfoResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model SubmitInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SubmitInfoResponseBody(name='body'),
}

async function submitInfoWithOptions(request: SubmitInfoRequest, runtime: Util.RuntimeOptions): SubmitInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callerUid)) {
    query['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.mainUserId)) {
    query['MainUserId'] = request.mainUserId;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.ecsDescList)) {
    body['EcsDescList'] = request.ecsDescList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SubmitInfo',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function submitInfo(request: SubmitInfoRequest): SubmitInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitInfoWithOptions(request, runtime);
}

model SyncPodInfoRequest {
  podName?: string(name='PodName'),
  reason?: string(name='Reason'),
  requestId?: string(name='RequestId'),
  sideCarType?: string(name='SideCarType'),
  status?: boolean(name='Status'),
  taskId?: long(name='TaskId'),
}

model SyncPodInfoResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model SyncPodInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SyncPodInfoResponseBody(name='body'),
}

async function syncPodInfoWithOptions(request: SyncPodInfoRequest, runtime: Util.RuntimeOptions): SyncPodInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.podName)) {
    query['PodName'] = request.podName;
  }
  if (!Util.isUnset(request.reason)) {
    query['Reason'] = request.reason;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.sideCarType)) {
    query['SideCarType'] = request.sideCarType;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SyncPodInfo',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function syncPodInfo(request: SyncPodInfoRequest): SyncPodInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return syncPodInfoWithOptions(request, runtime);
}

model UnbindGroupRequest {
  appId?: long(name='AppId'),
  bizCode?: string(name='BizCode'),
  name?: string(name='Name'),
}

model UnbindGroupResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model UnbindGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnbindGroupResponseBody(name='body'),
}

async function unbindGroupWithOptions(request: UnbindGroupRequest, runtime: Util.RuntimeOptions): UnbindGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.bizCode)) {
    query['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnbindGroup',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unbindGroup(request: UnbindGroupRequest): UnbindGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindGroupWithOptions(request, runtime);
}

model UnbindNodeLabelRequest {
  clusterId?: string(name='ClusterId'),
  instanceId?: string(name='InstanceId'),
  labelKey?: string(name='LabelKey'),
  labelValue?: string(name='LabelValue'),
}

model UnbindNodeLabelResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UnbindNodeLabelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnbindNodeLabelResponseBody(name='body'),
}

async function unbindNodeLabelWithOptions(request: UnbindNodeLabelRequest, runtime: Util.RuntimeOptions): UnbindNodeLabelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.labelKey)) {
    query['LabelKey'] = request.labelKey;
  }
  if (!Util.isUnset(request.labelValue)) {
    query['LabelValue'] = request.labelValue;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnbindNodeLabel',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unbindNodeLabel(request: UnbindNodeLabelRequest): UnbindNodeLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindNodeLabelWithOptions(request, runtime);
}

model UpdateAppRequest {
  appId?: long(name='AppId'),
  bizTitle?: string(name='BizTitle'),
  description?: string(name='Description'),
  language?: string(name='Language'),
  middleWareIdList?: [ int32 ](name='MiddleWareIdList'),
  operatingSystem?: string(name='OperatingSystem'),
  serviceType?: string(name='ServiceType'),
  userRoles?: [ 
    {
      roleName?: string(name='RoleName'),
      userId?: string(name='UserId'),
      userType?: string(name='UserType'),
    }
  ](name='UserRoles'),
}

model UpdateAppResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model UpdateAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateAppResponseBody(name='body'),
}

async function updateAppWithOptions(request: UpdateAppRequest, runtime: Util.RuntimeOptions): UpdateAppResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.bizTitle)) {
    body['BizTitle'] = request.bizTitle;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.language)) {
    body['Language'] = request.language;
  }
  if (!Util.isUnset(request.middleWareIdList)) {
    body['MiddleWareIdList'] = request.middleWareIdList;
  }
  if (!Util.isUnset(request.operatingSystem)) {
    body['OperatingSystem'] = request.operatingSystem;
  }
  if (!Util.isUnset(request.serviceType)) {
    body['ServiceType'] = request.serviceType;
  }
  if (!Util.isUnset(request.userRoles)) {
    body['UserRoles'] = request.userRoles;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateApp',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateApp(request: UpdateAppRequest): UpdateAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAppWithOptions(request, runtime);
}

model UpdateAppMonitorsRequest {
  mainUserId?: long(name='MainUserId'),
  monitorIds?: [ long ](name='MonitorIds'),
  silenceTime?: string(name='SilenceTime'),
  templateId?: long(name='TemplateId'),
}

model UpdateAppMonitorsResponseBody = {
  code?: string(name='Code'),
  msg?: string(name='Msg'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdateAppMonitorsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateAppMonitorsResponseBody(name='body'),
}

async function updateAppMonitorsWithOptions(request: UpdateAppMonitorsRequest, runtime: Util.RuntimeOptions): UpdateAppMonitorsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.mainUserId)) {
    body['MainUserId'] = request.mainUserId;
  }
  if (!Util.isUnset(request.monitorIds)) {
    body['MonitorIds'] = request.monitorIds;
  }
  if (!Util.isUnset(request.silenceTime)) {
    body['SilenceTime'] = request.silenceTime;
  }
  if (!Util.isUnset(request.templateId)) {
    body['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAppMonitors',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateAppMonitors(request: UpdateAppMonitorsRequest): UpdateAppMonitorsResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAppMonitorsWithOptions(request, runtime);
}

model UpdateDeployConfigRequest {
  appId?: long(name='AppId'),
  codePath?: string(name='CodePath'),
  configMap?: string(name='ConfigMap'),
  configMapList?: [ string ](name='ConfigMapList'),
  cronJob?: string(name='CronJob'),
  deployment?: string(name='Deployment'),
  id?: long(name='Id'),
  secretList?: [ string ](name='SecretList'),
  statefulSet?: string(name='StatefulSet'),
}

model UpdateDeployConfigResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model UpdateDeployConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDeployConfigResponseBody(name='body'),
}

async function updateDeployConfigWithOptions(request: UpdateDeployConfigRequest, runtime: Util.RuntimeOptions): UpdateDeployConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.codePath)) {
    query['CodePath'] = request.codePath;
  }
  if (!Util.isUnset(request.configMap)) {
    query['ConfigMap'] = request.configMap;
  }
  if (!Util.isUnset(request.configMapList)) {
    query['ConfigMapList'] = request.configMapList;
  }
  if (!Util.isUnset(request.cronJob)) {
    query['CronJob'] = request.cronJob;
  }
  if (!Util.isUnset(request.deployment)) {
    query['Deployment'] = request.deployment;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.secretList)) {
    query['SecretList'] = request.secretList;
  }
  if (!Util.isUnset(request.statefulSet)) {
    query['StatefulSet'] = request.statefulSet;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDeployConfig',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDeployConfig(request: UpdateDeployConfigRequest): UpdateDeployConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeployConfigWithOptions(request, runtime);
}

model UpdateEciConfigRequest {
  appEnvId?: long(name='AppEnvId'),
  eipBandwidth?: int32(name='EipBandwidth'),
  enableEciSchedulePolicy?: boolean(name='EnableEciSchedulePolicy'),
  mirrorCache?: boolean(name='MirrorCache'),
  normalInstanceLimit?: int32(name='NormalInstanceLimit'),
  scheduleVirtualNode?: boolean(name='ScheduleVirtualNode'),
}

model UpdateEciConfigResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model UpdateEciConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateEciConfigResponseBody(name='body'),
}

async function updateEciConfigWithOptions(request: UpdateEciConfigRequest, runtime: Util.RuntimeOptions): UpdateEciConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appEnvId)) {
    query['AppEnvId'] = request.appEnvId;
  }
  if (!Util.isUnset(request.eipBandwidth)) {
    query['EipBandwidth'] = request.eipBandwidth;
  }
  if (!Util.isUnset(request.enableEciSchedulePolicy)) {
    query['EnableEciSchedulePolicy'] = request.enableEciSchedulePolicy;
  }
  if (!Util.isUnset(request.mirrorCache)) {
    query['MirrorCache'] = request.mirrorCache;
  }
  if (!Util.isUnset(request.normalInstanceLimit)) {
    query['NormalInstanceLimit'] = request.normalInstanceLimit;
  }
  if (!Util.isUnset(request.scheduleVirtualNode)) {
    query['ScheduleVirtualNode'] = request.scheduleVirtualNode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateEciConfig',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateEciConfig(request: UpdateEciConfigRequest): UpdateEciConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEciConfigWithOptions(request, runtime);
}

model UpdateEnvironmentRequest {
  appEnvId?: long(name='AppEnvId'),
  appId?: long(name='AppId'),
  appSchemaId?: long(name='AppSchemaId'),
  replicas?: int32(name='Replicas'),
}

model UpdateEnvironmentResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model UpdateEnvironmentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateEnvironmentResponseBody(name='body'),
}

async function updateEnvironmentWithOptions(request: UpdateEnvironmentRequest, runtime: Util.RuntimeOptions): UpdateEnvironmentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appEnvId)) {
    query['AppEnvId'] = request.appEnvId;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appSchemaId)) {
    query['AppSchemaId'] = request.appSchemaId;
  }
  if (!Util.isUnset(request.replicas)) {
    query['Replicas'] = request.replicas;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateEnvironment',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateEnvironment(request: UpdateEnvironmentRequest): UpdateEnvironmentResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEnvironmentWithOptions(request, runtime);
}

model UpdateNormalDeployConfigRequest {
  appId?: long(name='AppId'),
  containerResourceLimit?: {
    cpu?: string(name='Cpu'),
    memory?: string(name='Memory'),
  }(name='ContainerResourceLimit'),
  containerResourceRequest?: {
    cpu?: string(name='Cpu'),
    memory?: string(name='Memory'),
  }(name='ContainerResourceRequest'),
  id?: long(name='Id'),
}

model UpdateNormalDeployConfigShrinkRequest {
  appId?: long(name='AppId'),
  containerResourceLimitShrink?: string(name='ContainerResourceLimit'),
  containerResourceRequestShrink?: string(name='ContainerResourceRequest'),
  id?: long(name='Id'),
}

model UpdateNormalDeployConfigResponseBody = {
  code?: int32(name='Code'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model UpdateNormalDeployConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateNormalDeployConfigResponseBody(name='body'),
}

async function updateNormalDeployConfigWithOptions(tmpReq: UpdateNormalDeployConfigRequest, runtime: Util.RuntimeOptions): UpdateNormalDeployConfigResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateNormalDeployConfigShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.containerResourceLimit)) {
    request.containerResourceLimitShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.containerResourceLimit, 'ContainerResourceLimit', 'json');
  }
  if (!Util.isUnset(tmpReq.containerResourceRequest)) {
    request.containerResourceRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.containerResourceRequest, 'ContainerResourceRequest', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.containerResourceLimitShrink)) {
    query['ContainerResourceLimit'] = request.containerResourceLimitShrink;
  }
  if (!Util.isUnset(request.containerResourceRequestShrink)) {
    query['ContainerResourceRequest'] = request.containerResourceRequestShrink;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateNormalDeployConfig',
    version = '2018-03-13',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateNormalDeployConfig(request: UpdateNormalDeployConfigRequest): UpdateNormalDeployConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateNormalDeployConfigWithOptions(request, runtime);
}

